|
|
|
|
|
by mschaef
3382 days ago
|
|
> I do not agree that an if macro stands for some specific lambda-based utterance. That isn't historically true, or in any other sense. Huh? Are you saying the use of lambdas does NOT give if* the ability to control the execution of 'then' and 'else'? My point is that if you're concerned about how often you evaluate a block of code (0, 1, or n times), there are ways to achieve this goal that do not require macros. (And consequently, the macros mainly serve as they should: to clean up the syntax, if necessary.) |
|
I gave if as an example; it was not intended to be an example of a macro which has to go out of its way to ensure once-only evaluation.
There are common examples of macros that use machine-generated unique variables to hold the results of evaluating an argument form, in order to be able to insert that value into multiple places in the generated code. An implementation of with-slots likely has to, for instance.
In documenting a library of C macros, we cannot specify a strict evaluation order without seriously constraining which of those macros are actually implementable.