Re:A Codewalk for Arc3's first-class(runtime) macros
by leppie on Tuesday May 29, 2012 @04:37AM
(#4036531)
There is something very wrong with the concept of 'runtime' macros. How is a 'runtime' macro any better than a function/procedure? TBH, I have no idea what a use case would be for a 'runtime' macro. A macro is generally a compile-time source transformation. If you need that at runtime, use EVAL.
[ Parent
| on HN ]
Re:A Codewalk for Arc3's first-class(runtime) macros
by Patient0 on Tuesday May 29, 2012 @04:47AM
(#4036562)
To me it's because they provide a simple way to solve the hygiene problem in an interpreter.
That is, it's easier to implement first-class macros (which allow hygiene) in an intepreter , than it is to implement scheme-style non-first-class hygienic macros...
I only say this because I know how to implement first-class macros, but I don't really understand how Scheme's hygienic macros work...
Re:A Codewalk for Arc3's first-class(runtime) macros
by Oxryly on Tuesday May 29, 2012 @07:07PM
(#4040467)
One difference is that macros (whether run-time or compile-time) use a call-by-name evaluation strategy. Hence they are a form of lazy evaluation. Functions (in scheme and lisp) are call-by-value IIRC.