2011-04-07

My thinking about Lisp's Macros

Macro is just let over lambda with prameterable bindings or body. Both being parameterable makes a macro-writing macro template: once given one, a macro is generated which expects another part. Again, this is just lamda with two parameters, two variables.

Macro and lambda differ in that the evaluation system treats them differently: macro has access to raw lambda list, unevaluated.

Macro is just lambda that has the chance given by the evaluation system to manipulate the raw lambda list and writes out new lists to replace itself. The unique and unified syntax of lisp renders the difficulty of writing them to be near to zero.

没有评论: