6 ms·
I don't think another language's macros can match lisp macros unless the other language is also homoiconic.
by tolsen718 6y ago
I don't think another language's macros can match lisp macros unless the other language is also homoiconic.
- neutronicus 6y agoClojure is weakly heteroiconic and seems to have rough parity
- fiddlerwoaroof 6y agoClojure is “homoiconic”: Clojure source code is represented in terms of the data structures Clojure applications manipulate. There’s nothing preventing Common Lisp from having a similar surface syntax either: a couple read macros on [ and {, and a library of normal macros would be sufficient and could probably be written over a weekend.
- p_l 6y agoIn fact, since Common Lisp "source code" is NOT defined in terms of text but data structures (that happen to have standard serialization/deserialization) and that's the level that macros work on, you could theoretically even make semi-algolish syntax and still keep CL's macro system. It would just look weird as fuck.
- fiddlerwoaroof 6y agoLike https://readable.sourceforge.io https://readable.sourceforge.io ?
- p_l 6y agoThat's one example, not as crazy as what's possible. Though I have to say I dislike the indent based blocks :/
- gnufx 6y agoLatter-day Dylan is infix with a Scheme-y macro system: https://opendylan.org/books/dpg/macros.html https://opendylan.org/books/dpg/macros.html Cue arguments, I guess, about whether Scheme is a Lisp, whatever their standards say.
- alehander42 6y agoi am not sure: you can have "quoting" without this property