From: Álvaro Castro-Castilla alvaro.castro.castilla@gmail.com
[...]
Alexpander
- A: it is supposed to support DSSSL and be nicer to Gambit
- D: I still get errors related to define-macros, even if they are not mixed with define-syntax macros. Taking into account that some of my macros work with both blackhole and syntax-case but not with alexpander, I assume this implementation is less mature/stable.
I think it is not a maturity/stability issue: Alexpander renames some variables and does not implements its own version of define-macro; so I think some problems are unavoidable if you want to mix code that use Alexpander and code that use Gambit's define-macro. Separate compilation is you friend here.
There is an newer version of the original Alexpander that is much less invasive in renaming variables, I planned to patch it with the DSSSL extension, but I am not sure it is worth the effort. I wondered if there is a way to be sure that Gambit's macroexpander runs *before* Alexpander, but I am not even sure that it could make sense.
I started hacking the original Alexpander for three reason:
1. using R5RS libraries
2. DSSSL compatibility (but I conclueded that it's not so important, thanks to ##define and ##lambda) 3. code size/compilation speed (much better than psyntax)
and it served me quite well.
The point is: is there any stable, good implementation of R5RS syntax-rules that is fully-compatible and nice to all of Gambit's functionality?
I don't think so. Maybe it will be here in the future if Gambit will adopt R7RS, either as a simple syntax-rule expander (similar to Alexpander) for the small language either as a more complete low-level system for the large language.
--marco