
May 26, 2005
1:07 p.m.
On 5/26/05, Chad Whitacre <chad@zetaweb.com> wrote:
Would there be any interest in extending the compiler package with tools for AST transformations and for emitting Python source code from ASTs?
Heh, so I guess the answer is "yes."
BTW, how does the concept of AST transformations relate to the concept of (Lisp) macros? Am I right to think that they are similar?
I think they are similar, but two key differences are: - An AST transformation can transform existing syntax but doesn't allow you to create new syntax. - An AST transformation has to be explicitly invoked. A macro is part of the language proper and has a semantics for how and when macros are evaluated. Jeremy