2 ms·
> If this happens at runtime, this means runtime evaluates the macro Generally speaking this isn’t the case. There are probably exceptions besides a repl, but
by eyelidlessness 4y ago
> If this happens at runtime, this means runtime evaluates the macro
Generally speaking this isn’t the case. There are probably exceptions besides a repl, but they’ll almost all be repl-like because macros are effectively functions of pre-compiled code, represented as lists as written in the code.
In other words, generally speaking, a lisp program’s life cycle goes something like this:
1. Developer writes lists.
2. Some of these lists are macros, compile them and execute them with their arguments. Many of these are themselves lists and symbols, which will be preserved according to various rules depending on which lisp you’re using and how they isolate code lists from program lists. It’s complicated.
3. Recurse step two until there are no more macro calls.
4. Now you have the actual program, and now you compile that.
5. Now you can execute the actual program.