er-macro-transformer/sc-macro-transformer
Marc Nieper-WiÃkirchen 22 Sep 2020 11:34 UTC
I would like to hear some opinions on the following questions:
(1) Shall we include another library for sc-macro-transformer?
This would include the following exports:
- sc-macro-transformer
- rsc-macro-transformer
- make-syntactic-closure
- capture-syntactic-environment
- identifier?
- identifier=?
- make-synthetic-identifier
(2) While the syntax-case interface is pretty much complete and
sufficient, both the er-macro-transformer and the proposed
sc-macro-transformer interface are lacking:
* Both sc-macro-transformer and er-macro-transformer are lacking an
equivalent of syntax->datum to get at the symbol names of identifiers.
* Both sc-macro-transformer and er-macro-transformer are lacking an
equivalent of datum->syntax to write composable anaphoric macros.
* Syntactic closures created by sc-macro-transformer cannot be destructured.
We can leave it at that, but this would mean that applicability and
expressiveness of sc-macro-transformer and er-macro-transformer will
be rather limited compared to the syntax-case system.
Or we could add a number of further primitives. This, however, would
make the systems described in SRFI 211 a proper extension of those
implemented by current Schemes. And one would probably arrive at a
system roughly like Andre van Tonder's implementation of SRFI 72, so
one could then provide syntax-case as well.