Hacker News new | ask | show | jobs
by steev 2123 days ago
> I can't understand why OCaml doesn't have mass adoption.

Probably for the exact same reason each year you think about learning OCaml you decide not to (I mean this sincerely, not trying to be snide).

I think the main reasons it doesn't see mass adoption in industry:

* There are only two major companies that do a substantial amount of OCaml that I can think of off the top of my head, Jane Street and Ahrefs. Facebook does some OCaml too but I don't think it's a core part of their stack.

* The tooling is lacking.

* People have an easier time learning Python or Java so you'll have a larger pool of candidates if you use one of those languages.

5 comments

> Facebook does some OCaml too

Using an ML or a Lisp for language tooling is the way to go. Nothing else in that league.

I would add Prolog to that list.
How about Haskell?
Haskell is like the nerdy cousin of the ML family. Everyone knows he's smart, but no one would think to ask him to fix the kitchen sink or install the new dishwasher.

Seriously, Haskell is massively impressive, both as a research language and as an implementation. But it does not shed that certain research attitude. Every known problem seems to be boring. "Oh you want a proxying http server? No problem, this is just the inversion of the endofoo over the category of abstract Monobars!". Sometimes I get the feeling that no one focuses on shipping actual software with Haskell.

Facebook uses Haskell in a critical portion of their user-content publishing pipeline.

https://engineering.fb.com/security/fighting-spam-with-haske...

> Sometimes I get the feeling that no one focuses on shipping actual software with Haskell.

With just a modicum of effort you can easily disprove this feeling.

> * The tooling is lacking.

Care to elaborate on this point? Maybe it's just because I'm coming from Haskell (lol), but my experience with OCaml's tooling has been pretty darn good.

While I don't think there's a heavyweight IDE for OCaml à la IntelliJ, in Emacs I get my error messages inline, on-the-fly checking (including type inference and checking, which is huge), and pretty good completion. All of this seems to "just work".

The build system also seems to "just work" and utop is pretty nice.

Now try setting up OCaml tooling on Windows. That alone would be responsible for a lot of missing users.
This should improve soon: https://youtu.be/E8T_4zqWmq8?t=3459
I just cannot understand how people find Python easy to learn but languages like F# or OCaml hard to learn. I personally find Python to be a much more confusing language than F#.
Seriously. Every time I'm forced to use Python or JavaScript I feel like I'm fumbling around totally blind.
I agree with most of your points. Though for the Python and Java thing, I think it's less that they're easier to learn and more that they are taught in school and/or already have a lot of popularity/momentum.
ocaml reasonml seems quite on the forefront .. it's not the core but it's something public