Hacker News new | ask | show | jobs
by lholden 4474 days ago
I've found it interesting that OCaml hasn't had more interest given the amount of recent momentum in Haskell.

Haskell is an Ivory Tower. The features that generally draw one to the language also tend to be the things that eventually push one away. Haskell has grown a lot over the years however as the language evolves to allow general programming within a pure framework.

OCaml on the other hand tends to make a compromise, acknowledging that the programmer occasionally needs a different tool for the job. OCaml allows the programmer to opt into things like mutability and objected oriented code when the need arises. These compromises can also be seen as the languages downside however.

I find it interesting that the driver for the author into OCaml is JavsScript... but it's nice to see OCaml come up a bit more often. :)

4 comments

I feel it's similar to any competitive environment: differentiation requires making strong tradeoffs. Haskell's choice of tradeoffs---while initially very ivory tower---have led to to become a strongly differentiated language. You not only learn how HM typing and full commitment FP feel, but also how to structure code purely, compose effects, and abuse laziness.

So for the very same reasons you give---Haskell has made fewer tradeoffs for "practical" programming---Haskell has become something valuable and interesting. On those tides the community has grown.

Another big obstacle was that the INRIA license effectively prevents forking the language (you can only distribute modified compilers as original source + patch, not as eg a github repo) so for a long time there was a bottleneck on the language evolution. Lots of useful extensions (eg delimited continuations, staging) wilted and died because of that.

The rise of OcamlPro and Ocaml Labs does give me hope for the future of the language. There is already renewed momentum behind fixing packaging and handling multicore.

Now if someone would just figure out ad-hoc polymorphism (just pick one of the dozens of propasals) and maybe even document camlp4/5....

I have to admit JavaScript isn't the only driver for my interest in OCaml. It is however the angle I'm pushing for using it in my day job :)
So maybe "middle of the road" and "pragmatic compromises" are overrated.
You are acknowledging that you are wrong without even noticing. No, haskell is not an "ivory tower". It is a very practical, useful language. That is precisely the reason it has gained so much momentum and usage. Ocaml had more users than haskell back in the mid 00s. Now haskell absolutely dwarfs ocaml. The reason ocaml doesn't get more interest pigging backing off of haskell is that there is no reason to use ocaml over haskell.