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

Samuele Pedroni pedroni@inf.ethz.ch
Mon, 18 Mar 2002 23:06:10 +0100


From: Guido van Rossum <guido@python.org>
> > I think I understand why macros work so well with Common Lisp.  In
> > Common Lisp, the AST is really a list.  The AST is easy to read and
> > write and it's easy to make macros transform it.  That gives Common
> > Lisp programmer's an amazing amount of power.  Maybe Guido thinks it
> > gives them too much.  Myself, I don't know.  Most of the time you
> > don't need macros but when you do you really do.
> 
> It's not that I think it gives too much power, but I do think it's
> wasted on most users.  An open question is whether it's worth adding
> the complexity for the few who would benefit.
> 

Maybe an approach with an higher entry cost, such
as opening up for extension the parser-compiler would be more pythonic.

regards.