8 ms·
Do you have a citation for this? I was under the impression it was entirely possible for lisp macros to be expanded at runtime. For example, you could have data
by RHSeeger 7y ago
Do you have a citation for this? I was under the impression it was entirely possible for lisp macros to be expanded at runtime. For example, you could have data that is passed to a function and then used as code (because code and data are the same thing). The system doesn't know it's going to be used as code until it is, so the macros can't be expanded until then.
- lispm 7y agoIf Lisp uses an interpreter (which runs Lisp source code), you may see macro expansions at runtime. For compiled code, there usually will be no macro expansion at runtime. Lisp will not macro expand code in compiled code, since all macros need to be expandable at compile-time. But: if you explicitly want it, you can generate code at runtime and then you need to call EVAL or COMPILE. Then macro expansions might happen.