Between Opam [1], Dune[2] and utop[3] the "new comer experience" has been really good so far. The editor integration with vim/emacs has been top notch, and visual studio code has turned into a really nice option as well for people who don't like vim/emacs. I'm sure there is still room for improvement, but i'd say its atleast heading in the right direction!
[1] https://github.com/ocaml/opam
[2] https://github.com/ocaml/dune
I don't remeber anyone on those assignments ever complaining about syntax.
Also, nesting pattern matches is a bit ugly:
match x with
| Foo y ->
match y with
| Yes -> ok ()
| No -> not_ok ()
| Bar z -> whatever()
does not work, it must be: match x with
| Foo y ->
begin match y with
| Yes -> ok ()
| No -> not_ok ()
end
| Bar z -> whatever()
which is not a big deal but surprisingly easy to forget.Some people would also really like to write
let x = foo
let y = bar
x + y
but it has to be let x = foo in
let y = bar in
x + y
and those many "in"s accumulate.A bunch of these things look a lot cleaner in Haskell. Although it does it by being indentation-sensitive, which other people love hating.
The other criticisms are the ones worth attending.
In some ways, OCaml's problem mirror that of Erlang. The gnarly syntax is largely being addressed by Reason (much like Elixir does for Erlang), but I don't see it catching on as much as I'd like, and it still has some warts, I think.
As for killer apps, distributed data processing is something that OCaml could be great at, given that it marries Erlang's functional style with a rich type system, and there was a minor wave of libraries (for concurrent, distributed actor programming) way back in the 2010 or so, but those libraries are now dead and nothing really happened. Meanwhile, Scala largely leads that story (Akka is very popular, and Scala also seems to be the language of choice for Spark, Beam, etc.) and Haskell now has Cloud Haskell, which is modeled on Erlang. Also, we kind of need multicore for this.
(Distributed data is an area where I hope the Java/Scala world gets competition soon. A lot of people, I suspect, would like this, so there's an opportunity to rapidly gain mindshare. I don't see much happening there. Pony is promising (e.g. Wallaroo), and some people have had success with Go (Pachyderm). I don't know Pony, but without genetics, Go is a pretty awkward fit for data pipelines; witness the number of hoops jumped, and resulting limitations, in the Apache Beam SDK for Go. Spark et al rely on distributing bytecode to worker nodes, something you just can't do in Go. Not sure about OCaml.)