Imagine if your favorite programming language, X, had some sort of facility to expose a function/method's Abstract Syntax Tree and a meta-language for scripting changes to particular patterns of in the AST or activating different functionality. Well, in Lisp, the language is also it's own Abstract Syntax Tree and it's own meta-language.
(I use a Smalltalk meta-language all the time at work for code transformation, but even with such a facility Smalltalk can't quite do everything Lisp macros can do.)
As the post notes a read macro is not a kind of macro. Nevertheless his example is in competition with a macro based approach to the problem. One might wish for a variant on DEFUN say DEFVN so that one can say
(defvn square (x)
(* x x))
and get both (square 3) => 9 and (square #(1 2 3)) => #(1 4 9). This is not hard; to show off the short paste at http://paste.lisp.org/+24PP one needs a fancier example
Imagine if your favorite programming language, X, had some sort of facility to expose a function/method's Abstract Syntax Tree and a meta-language for scripting changes to particular patterns of in the AST or activating different functionality. Well, in Lisp, the language is also it's own Abstract Syntax Tree and it's own meta-language.
(I use a Smalltalk meta-language all the time at work for code transformation, but even with such a facility Smalltalk can't quite do everything Lisp macros can do.)