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 :-)
In reply to Re^2: Pretending to be lisp: macros
by adrianh
in thread Pretending to be lisp: macros
by anjiro
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |