3 ms·
Usually though, macros in lispy languages are evaluated not at runtime, but before that, at read time or macro expansion time. There are perfectly valid use ca
by zelphirkalt 4y ago
Usually though, macros in lispy languages are evaluated not at runtime, but before that, at read time or macro expansion time.
There are perfectly valid use cases for these things, which do not make it harder to understand the code. Properly done, they might even make the code easier to understand. One example is writing a "timing function" (a macro). WHy a macro? Well, because you cannot call (time expr ...) when time is a normal function, because of order of evaluation. You could put the expressions into lambda and reduce readability that way, or you could make time a macro and get rid of the lambda wrapping of the expressions.