3 ms·
Macros give you control over evaluation order. Fns don't. (or a b) If a is truthy, b will never evaluate
by beders 5y ago
Macros give you control over evaluation order. Fns don't.
(or a b)
If a is truthy, b will never evaluate
- grumpyprole 5y agoNote that functions in other languages, like Haskell and Scala, do allow some control over evaluation order. One can annotate function parameters to achieve call-by-value or call-by-need as required. Macros can analyse/manipulate the abstract syntax tree of their inputs, so I think of them as extending the compiler.
- lispm 5y ago(or (lambda () a) (lambda () b)) Now you only need to define the function OR...