3 ms·
Take OCaml for comparison: It has a more or less reasonable way of extending the language with an extensible parser camlp4 that ultimately yields a fixed AST. N
by orbifold 12y ago
Take OCaml for comparison: It has a more or less reasonable way of extending the language with an extensible parser camlp4 that ultimately yields a fixed AST. No one would get the idea to use it just for fun, or one-shot abstractions, but it is integrated into the toolchain well enough that you can reliably distribute libraries that use syntax extensions. The general attitude that "coders are dumb, we need to protect them from themselves" lead to the development of mediocre languages like Java. Compare that to something like Racket, where despite some flaws most of the macros provide an obvious and very real benefit, without overcomplicating the compiler (for example the match macro, or the macros that constitute the C-FFI). Ideally in my eyes a language should provide the programmer with maximal possible expressiveness without compromising a core simple design.