3 ms·
> In particular, image-based development is a rarity nowadays, a Galápagos island feature that is undesirable in many contexts, but it’s the thing that makes it
by kazinator 3y ago
> In particular, image-based development is a rarity nowadays, a Galápagos island feature that is undesirable in many contexts, but it’s the thing that makes it possible to have Turing-complete macros that are defined in the same place as the code, without needing to involve a build system.
This is false. Lisps do not have to have an image-based development system in order to have Turing-complete macros in the same language as the code, inside the code.
The proof is the existence of such systems. There are Lisp dialects which do not have image dumping, yet have working macros.
What you need is for the macros (and any helper functions of the macros) to be loadable into the compiler process. You do not need image saving and restoring for that to work.
Image saving and restoring is an independent feature of memory management; it traverses the heap and writes a representation of all the objects which can be used to re-animate the session.
Some Lisps rely on image saving for producing executables, but that's not related to how macros work.