Hygienic macros (was: do...until wisdom needed...)

Douglas Alan nessus at mit.edu
Wed Apr 18 06:02:32 EDT 2001


whisper at oz.net (Dave LeBlanc) writes:

> On 17 Apr 2001 20:59:52 -0400, Douglas Alan <nessus at mit.edu> wrote:

> > Lisp has traditionally had "procedural macros".  Procedural macros
> > in Lisp are a kind of function -- they are implemented in Lisp,
> > but the return value of the macro, rather than being returned as a
> > function value, is taken to be a piece of code.

> Sounds so much like Tcl!

Kind of.  Except God is in the details.  Tcl is slow and its semantics
are messy.  None of this applies to hygienic procedural macros.
Hygiene keeps the semantics clean, the macros run at compile-time --
not at run-time, and the code that is being treated as data has
structure -- it's not just a string.  Also, procedural macros are
designed to be used sparingly, not for everything.

|>oug



More information about the Python-list mailing list