top | item 36198284

(no title)

pwpwp | 2 years ago

I find the claim about image-based development being required for macros somewhat unfounded.

The most trivial counterexample is an interpreter - it can simply evaluate the macros just like ordinary functions.

A step up in complexity is a compiler that - during compilation - compiles macro definitions by emitting code and dynamically loading it (Goo does this http://people.csail.mit.edu/jrb/goo/goo.htm , and I have also put a toy implementation of this together using dlopen, and there are probably many other impls that do this.)

discuss

order

KingMob|2 years ago

Yeah, that part made little sense to me.

Clojure is one of the weakest lisps when it comes to macros, but you can still define and use them at run-time, and it has no image-based development.