4 ms·
But there is nothing stopping non homoiconic languages from adding first-class macros (macros that are written in the language itself). That is true in theory.
by papaf 16y ago
But there is nothing stopping non homoiconic languages from adding first-class macros (macros that are written in the language itself).
That is true in theory. However, I struggled with camlp5 [1] for hours to achieve something that could be done trivially with a lisp macro. I'm certain its because the I was having to do much more than rewrite a datastructure. Interestingly, it was this very experience that moved me back to lisp.
[1] http://martin.jambon.free.fr/extend-ocaml-syntax.html http://martin.jambon.free.fr/extend-ocaml-syntax.html
- kenjackson 16y agoZak mentioned Nemerle, which appears to have a very simple macro syntax. It actually reminds me of Lisp, although I'm sure Lispers will happily explain how its completely different. :-) Have you taken a look at Nemerle? What there is broken compared to Lisp?