in reply to Re: Pretending to be lisp: macros
in thread Pretending to be lisp: macros

The advantage that Lisp macros have over most other non-lisp languages is that they can manipulate the syntax tree as a data structure.

And that is a hellishly large advantage.

The problem with taking the filter approach in Perl 5 is that multiple filters don't play well together. Since they're based on purely textual substitutions the text that one filter expects can interfere with the expectations of another.

If, however, everybody is dealing with syntax trees this problem disappears... one of the (many) reasons I'm looking forward to Perl6 :-)

Replies are listed 'Best First'.
Re: Re^2: Pretending to be lisp: macros
by diotalevi (Canon) on Sep 19, 2003 at 22:58 UTC

    The only alternative to this in perl5 is B::Utils and B::Generate and you have to be a wizard to do anything with it. Uck.