[Python-Dev] A Hygienic Macro System in Python?

Jeremy Hylton jeremy@zope.com
Mon, 18 Mar 2002 15:50:46 -0500


On Mon, 18 Mar 2002 15:31:47 -0500
 Tom Emerson <tree@basistech.com> wrote:
> Anyway, if this has been discussed and shot down, I'll
> end the
> discussion now. However, if this something that has been
> considered,
> or might be, I'd be interested in pursuing it further.

There has not been much interest in macros of any sort,
although there have been a few threads on comp.lang.python
recently.  It may be that a few motivating examples would
make clear why we should be interested :-).  

I have a hunch that many Python programs use classes +
operator overloading to achieve some of what Schemers
achieve with macros (clearly not everything).  That is, we
live with the basic syntax we're given and use classes to
extend behavior.

Jonathan Bachrach's Java Syntax Extender seems like it
provides a module for extending languages with more
conventional syntax, but I found his OOPSLA paper short on
the concrete details.  Perhaps it's more transparent to a
more expert user of macros.  There's a reference somewhere
around here:
http://www.ai.mit.edu/research/abstracts/abstracts2001/reliable-software/reliable-software.shtml

Jeremy