A decade ago it looked like O'Caml was going to be the language that brought FP to the masses. It had good runtime performance, good tools, and a decent library. Then the development team basically did no work on the language for some eight or so years, and other languages, notably Scala, F#, and Haskell, have gained ground.
It is hard to cross from academia to commerce. The changes that were (and are) needed to O'Caml are not things that will result in publications, and thus don't fit the academic funding model. At the same time they are a precursor to attracting wider interest in the language. It seems that a benefactor like Jane Street is needed for this to occur. Certainly it seems that Jane Street is eager to spend money to fix this problem.
The story of O'Caml is a good reminder that in language adoption, as in business, execution, along with a bit of luck, what matters. The world is full of could-have-beens. And on that note, I've got code to write...
The number one problem with commercial OCaml is the lack of comprehensive library support. Until that's addressed, it's not going to take off. Brilliant language, not very practical. F# is a step in the right direction here.
While F# is a great language, its main problem is that it is basically MS only. At the current stage of development mono lags behind official MS .net implementation too much in terms of performance/stability/features.
Also, last time I checked only some parts of what mono implements are covered by the Microsoft Community Promise (i.e. promise not to sue you over it.) If there's anything new on this front, please share.
The last time I tried installing Batteries (on OS X) it was a big PITA and it looked like it was dead in the water (this was about 18 months ago).
During the same time using GODI to install a xml processing library completely hosed my system after me foolishly granting it root rights, which killed my OCaml enthusiasm for good.
OCaml is in itself a really nice language (apart from some warts like lack of native multithreading support) but it's tooling, infrastructure and "first developer experience" and lack of progress in these areas in the last years is beyond atrocious (compared to F#, Scala, Clojure, Haskell, Ruby, Python, JavaScript).
I wonder if there's any hope of ever getting type classes in OCaml. Then you'd be able to have stuff like a single "print" function you can give any type of value that can be turned into a string representation.
Afaik (and according to Xavier Leroy), it's not planned in mainstream.
Now, implementation of typeclasses is pretty-well documented, so if anyone's willing to finance OCamlPro on this, I don't think there's any technological or scientific barrier.
The JVM is quite a bad choice for languages like ocaml as it doesn't support full tail call elimination, which is a fundamental aspect for the predominant style of writing ocaml. So you would either have to simulate the ocaml stack on the java heap (slow and will probably make ocaml/java interop ugly, defeating the whole purpose of porting to the JVVM) or rewrite most of the existing ocaml code in a ocaml-for-the-jvm style that is quite different from normal ocaml style, taking into account which tail calls can be optimized and which cannot. And if you decide to go down that road, you will not gain much you cannot get by using scala right now, the only missing thing is camlp4.
IIRC, the next JVM will indeed offer a new operation that allows tail calls (not exactly tailrec). However, this operation is incompatible with the Java security model (what you're allowed to do depends on what's above you in the stack -- this is used in many places in Java, in particular for anything related to accessing the screen or the file system, or more generally anything involving JNI) and with the Java exception model (exceptions contain the whole stack). Therefore, the operation will not be used by Java itself, and there are chances that using this operation in JVM languages without breaking compatibility with the Java stdlib will take some work, at least for the features that relate to security.
I'm really loving Yeti. It's not very mature but it's a very promising language.
It does need more libraries but it's also extremely interoperable with Java/JVM. Very simple and easy to call out to Java libraries. Also compiles to native JVM classes (can be called easily from Java).
For anyone interested, I managed to write a Mustache implementation last weekend:
Nothing wrong with that. I believe that everybody wants fast machine-code compilers to exist.
However, experience shows that, at least in presence of sufficient RAM and for code that runs long enough, the combination of VM + JIT beats fast machine-code. For sources, see the Big Language Shootout (nowadays, JIT-compiled Java ranks above OCaml and even C in many benchmarks) or the Dynamo papers (JIT-recompiled native C beating optimized native C by about 5% on reference benchmarks).
In addition, having a VM + JIT allows for very nice tricks. For instance, recent versions of MacOS X use LLVM code that is dynamically targeted to either the CPU (generally predictable when you're building the application) or the machine GPU (much harder to predict) depending on available resources. If one thinks in terms of distributed/cloud resources rather than one computer, it also makes sense to target one specific architecture at the latest possible instant (e.g. during deployment, possibly even after work-stealing), to be able to take advantage of heterogeneous architectures. Also, the VM + JIT combination paves the way for extremely powerful debugging primitives, or for late optimizations that just can't be performed during compilation due to lack of information.
So, in the long run, it's quite possible that efficient machine-code will be relegated to niches (e.g. system development), while JIT-ed code will [continue to] take over the world.
It is hard to cross from academia to commerce. The changes that were (and are) needed to O'Caml are not things that will result in publications, and thus don't fit the academic funding model. At the same time they are a precursor to attracting wider interest in the language. It seems that a benefactor like Jane Street is needed for this to occur. Certainly it seems that Jane Street is eager to spend money to fix this problem.
The story of O'Caml is a good reminder that in language adoption, as in business, execution, along with a bit of luck, what matters. The world is full of could-have-beens. And on that note, I've got code to write...