3 ms·
Genuinely curious here, I don't know much Lisp, but dont Lisp macros tend to be powerful in the sense that they expand to more statements for runtime, whereas t
by brobdingnagians 8y ago
Genuinely curious here, I don't know much Lisp, but dont Lisp macros tend to be powerful in the sense that they expand to more statements for runtime, whereas the purpose of C++ constexpr is to compile it down to one constant at runtime?
- pmarin 8y agoLisp macros expand at compile time. You can also generate code and execute it with eval like in many other languages like python.
- Filligree 8y agoLisp macros expand at compile time, but there's nothing special about the code running in them. Nothing at all stops you from doing arbitrary evaluation in one. Speed also isn't as much of an issue, because macros (and the functions they call) can be compiled before execution.
- brobdingnagians 8y agoAah, k, thank you!
- deleted 8y ago[deleted]
- gnulinux 8y agoYou can do arbitrary computation with lisp macros. But the magic you do it exactly the same way you do runtime computation.