It has a source filtering mechanism called camlp4. At the heart of it is an extensible replacement parser, which makes it almost trivial to change or extend the language. One of the examples in the manual adds a new loop construct in six lines of code.
Of course, camlp4 itself is written not in ordinary O'Caml but in the "revised" (formerly "righteous") syntax invented by the author of camlp4.
It's interesting that several of the "big" changes planned for Perl 6 are already features of O'Caml: extensible syntax, currying, stable multithreading.
Oh, and it's (conceivably) faster than C++.
macro languages (Score:1)
Do you know Scheme? One interesting thing in Scheme is continuations, which Ocaml (to my knowledge) is lacking, but parrot is promising to deliver.
Scheme and Lisp in general are the prototype of extensible syntax languages. I haven't tried camlp4 yet, so dunno if it's going to be as clean.
There are quite fast (and some very fast) scheme implementations as well. One thing that might make Scheme more similar to Perl than Ocaml, is that it's (general