Extension Points, or how OCaml is becoming more like Lisp
blogs.janestreet.com
blogs.janestreet.com
Has anyone done any comparisons?
Avoiding bytecode in the compilation toolchain is really the main benefit though. This was originally due to the fact that only the bytecode backend supported dynamic loading (which is used by camlp4 to load the syntax extension modules). When native dynamic code loading was added to OCaml circa 2009 or so, the build systems around camlp4 never really took up the change to switch to the much faster native code version. All the ppx extensions emerging now are at least guaranteed to have a native code version on all the major supported architectures (x86, ARM, Sparc, PPC)
There is a link from the article with a more complete example of how the extension points really work: http://whitequark.org/blog/2014/04/16/a-guide-to-extension-p...
OCaml is great because it is doing a lot of things right. Hope, this new feature will become more widely used than camlp4, and become a stable feature of the language.
This story isn't really OCaml becoming more like Lisp; rather, it's OCaml finding a way to implement Lisp's best feature without the downsides of being Lisp.
I'd say most angles except the type system as you point out, or am I missing something?
Syntax is a trade between regularity and expressiveness. What you're seeing with "languages improving towards Lisp" is, in my opinion, languages seeking the benefits of greater regularity.
The downside of the phrase Turing complete is that there isn't a practical limitation that instantly comes to mind when you hear that phrase. You don't hear people say "Oh no, that wouldn't be Turing complete". Complete or not, how does it affect a real application?
Still that's not too bad, since type checking is always conservative: if a program passes, we know it's correct(ly typed). If it doesn't pass, we don't gain any knowledge: it may be incorrect, or it may be correct in a way which the type checker's limited algorithm cannot determine (ie. a Goedel sentence).
I'm very concerned whether my programs terminate/coterminate, since having to kill them part-way-through could cause corruption and other nastiness. Whether the type-checker terminates or not I don't really care about; I can just kill it after a certain timeout and keep fiddling with my code until it passes, just like any other type error.
Of course, a timeout removes Turing-completeness, but that timeout is under my control at the commandline, rather than being an inherent property of the algorithm.
Now I have something to play with on the upcoming weekend. :)