3 ms·
Right now, the macros are very naive -- they are passed the entire unevaluated AST on which the macro is invoked and the new AST they return is used instead. I
by thedigitalengel 15y ago
Right now, the macros are very naive -- they are passed the entire unevaluated AST on which the macro is invoked and the new AST they return is used instead. I think this makes them FEXPRs. They do capture the defining lexical environment.
Thanks for the link, looks very helpful.
- pwpwp 15y agoThe best semantics for fexprs are probably Kernel's: a fexpr receives as parameters (1) the AST (2) the lexical environment in which the fexpr is called. (This dynamic lexical environment is given in addition to the captured static lexical environment - the env in which the fexpr was defined.) I believe this two-argument fexpr design goes way back, but I'm not sure. http://web.cs.wpi.edu/~jshutt/kernel.html http://web.cs.wpi.edu/~jshutt/kernel.html