4 ms·
Clojure macros were designed in from the beginning, and thus a significant portion of Clojure core is built using macros. Also, to repeat an oft-stated argumen
by willismichael 13y ago
Clojure macros were designed in from the beginning, and thus a significant portion of Clojure core is built using macros. Also, to repeat an oft-stated argument, Clojure is homoiconic, making it much easier to treat code as data, and data as code, which dovetails quite nicely with the macro system.
- happy_dino 13y ago> a significant portion of Clojure core is built using macros Well, pretty much all the Scala compiler is written using macros, because compiler API ~= macro API. Homoiconicity is nice, but the lack of it doesn't make anything impossible. If there is anything which makes stuff impossible, it's the static type system, which can catch most of your macro errors at compile time. That's a pretty good thing in my book.