by dragontamer · 4y ago · 0 comments
Macros would be evaluated at compile-time (or arguably _right before_ compile time).
I found my exact question on stackoverflow: https://stackoverflow.com/questions/7072980/how-do-you-compi...
The answers on SO are still not clear to me, some people say the macros can be evaluated at compile time, some say that the runtime needs to include some kind of interpreted to run macros. Some say incremental compilation is key to understand how macros get evaluated at compile time.
I will run experiments on this.
When I first heard the term incremental compilation, I thought of a process like going through the ast couple of times and evaluating expressions. This wasn't what it meant. Now it makes sense. You include the lisp compiler in each binary. For parts you cannot evaluate at compile time, you compile at runtime, just like a JIT.