3 ms·
Lisps that are based purely on compilation implement (eval form) similarly to this: (funcall (compile nil `(lambda () ,form))) Lisps that are not based pure
by kazinator 3y ago
Lisps that are based purely on compilation implement (eval form) similarly to this:
(funcall (compile nil `(lambda () ,form)))
Lisps that are not based purely on compilation can have an eval function that walks the source code and interprets it. Or there could be a VM.
So the question is really, how do Lisps that compile to C implement the dynamic compile function? Typically it's all part of the same framework as file compilation.
There is a run-time dependency on the C compiler: for run-time compile to work, it has to be installed. The compile function writes something to a file, or perhaps a pipe. The compiler is invoked and produces a .o file; the function then loads that into the image and bind it to a funcall-able object.
It's a dependency that's a bit hard to swallow, since a C toolchain is hundreds of megabytes nowadays.