|
|
|
|
|
by sctb
2897 days ago
|
|
If I understand it correctly, Lisp-2 is a way (not the only way!) of maintaining more intuitive semantics in the face of macros. If I write the following: (your-macro
(let ((x (foo y))
(bar x))))
I probably don't want the meaning of FOO or BAR to be up for grabs based on the expansion of YOUR-MACRO, and certainly not LET. Lisp-1s often have hygienic macros to deal with this concern, but not always. |
|
Where your comments falls down is that all the Lisp-2s I know allow the "function definition" of a symbol to be overriden in a similar way, e.g., in Common Lisp the macro might expand to (flet ((bar (arg) (* 5 arg))) (let ((x (foo y))) (bar x))) where FLET is a macro similar to LET but for function definitions.