[gambit-list] Current situation of macro systems in Gambit

Álvaro Castro-Castilla alvaro.castro.castilla at gmail.com
Thu Nov 15 05:07:11 EST 2012


Thanks for your replies.
Some months ago, there was a very interesting propopsal by Per, which was
motivated by the conversations Mikael and I had with him regarding
Blackhole. His position was that with a simple addition to Gambit's code,
benefits for the define-macro system would be huge, effectively achieving
hygiene. But it must be done in
My issues with blackhole were not related to macro systems, but issues with
finer compilation workflow control.

Marc, how hard would be to implement this? (by you or someone with no prior
knowledge of Gambit's internals)

https://mercure.iro.umontreal.ca/pipermail/gambit-list/2012-March/005815.html






On Thu, Nov 15, 2012 at 10:28 AM, Marco Benelli <mbenelli at yahoo.com> wrote:

> > From: Álvaro Castro-Castilla <alvaro.castro.castilla at 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.iro.umontreal.ca/pipermail/gambit-list/attachments/20121115/3cc0f110/attachment.htm>


More information about the Gambit-list mailing list