[gambit-list] Proposal for lightweight real hygienic macros in Gambit

Per Eckerdal per.eckerdal at gmail.com
Mon Mar 26 12:31:20 EDT 2012


Hi,

On Monday 26 March 2012 at 18:10, Alex Queiroz wrote:

> On Mon, Mar 26, 2012 at 6:01 PM, Marijn <hkBst at gentoo.org (mailto:hkBst at gentoo.org)> wrote:
> > 
> > I would be interested in knowing how this proposal compares with
> > implementing a low-level hygienic macro system such as syntactic
> > closures or explicit renaming macros. Actually now that I said that
> > this proposal sounds very much like a (partial?) implementation of
> > explicit renaming macros on top of the defmacro system. Doesn't the
> > paper you referenced mention something like that as well?
> > 
> 
> 
> I would rather have syntactic closures as well.
Syntactic closures are much more complex, both conceptually and in practise to implement. The purpose of the designed outlined in this proposal is to not require to augment the language with a highly complex new identifier type that is distinct from symbols.

With this proposal, no new data type is required. You can write macros that only accept pure s-expressions (as they are parsed) as input, and only return pure s-expressions (that are pretty-printable without losing information, so it's easy to understand exactly what the return value means)
> The paper contribution
> seems to be focused on the fact that it's possible to write hygienic
> macros on top of unhygienic macros and symbol macros, which is what
> Common Lisp has. Besides it says that a code walker is not needed, but
> that is not a necessity if the macro system would be integrated in
> Gambit.
> 
> 

It is true that the paper is written in that context. I believe its ideas are more broadly applicable than what the paper describes. 

Cheers,

Per
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.iro.umontreal.ca/pipermail/gambit-list/attachments/20120326/4a0492df/attachment.htm>


More information about the Gambit-list mailing list