If you are interested mainly in the functional language aspect of OCaml and use Windows, F# is very close to OCaml in syntax/semantics, but has really good support within Visual Studio (a really good debugger for example).
Once you want to use some of the more advanced features (Modules and Functors come to mind), you can switch back to OCaml relatively easily since they are so similar.
I love OCaml the language, but the tooling, especially wrt building (ocamlbuild, Oasis etc) , is horrendous. That said, the situation is much better now, than say 5 years ago.
Some of the tooling is really great, e.g. opam Just Works, utop feels very comfortable and merlin is amazing[1].
The lack of a standard build system is annoying yeah; I tried for a while to make do with just ocamlbuild and a Makefile, but eventually gave in and learnt Oasis, and it does the job just fine for my purposes, just feels a bit messy (compared to something like cabal, which at first sight hides a lot of the intermediate steps).
FWIW I basically use the same _oasis file over and over again, it literally takes only 5 minutes to set up a project's needed boilerplate, _oasis, .merlin and opam directory.
I really wish there were an implementation of SML that got some traction. It's a lovely language, but has very few libraries for actually getting anything done.
I do not think it is too late for SML necessarily. MLton (the full-program-optimizing compiler) is very competitive with the (one) OCaml implementation.
As someone who did a lot to market certain OCaml libraries, I have seen similar interest in some of the "modern" SML libraries I have played around with. Not a ton of work has gone into both of these, but you may be interested to look at two projects MonoML[0] and SSMLS[1].
These are some /very/ minimal projects I've worked on in SML in the past few months to gauge how well SML might work as a modern, web-friendly, higher-level language. The results are certainly not completely disappointing.
Edit: Oh also! HamletML[2] (yes, written by the 1ML guy) is a very interesting ML implementation that would probably be a great way for work on modern language features. Not that I know what I'm talking about, but it could also provide the framework for an even more powerful backend/optimizing compiler.
Unfortunately, SML has no industrial users. At least, that I've heard of. It's a language that's used mostly in teaching and academic research. First ML I used was SML/NJ in my intro CS class, and haven't seen it since. Whereas OCaml has a many industrial users and is widely deployed. My favorite example is of course management layer for the Xen hypervisor[0][1], but there are more as well[2].
Adam Chlipala has a writeup[3] on comparing SML and OCaml that may be of interest to the discussion.
Barring that, "Successor" ML is cleaning up some deficiencies in the original standard, and ML implementations are starting to integrate the changes.
But yeah, a strict ML with the pristine syntax of SML; the modular implicits coming to OCaml; the innovative ideas in 1ML -- now that would be a great language.
I like OCaml very much, though I haven't written code in it in the last 10 years, when I taught myself the language a long time ago I very much enjoyed it. I preferred SML/NJ, but that never got any velocity.
Does anyone know any good GUI OCaml IDE for Mac (something like RStudio)? Because the plugins for Eclipse and Intellij aren't very good and ocaml-top doesn't seem to work.
None exist. So far the best solution is to use Emacs with [2]
* merlin-mode, for autocompletion
* ocp-indent, for external code formating... think running gofmt on every enter press (surprisingly, it's fast enough unless your file is 2k lines long)
* tuareg-mode (everything else, REPL etc.)
* flycheck-ocaml for syntax checking
The "real" IDE plugins aren't even close and that's saying a lot since the hodge-podge of addons I just listed isn't
The default Emacs user experience is awful so if you're a Vim user, just install the "evil" package and enable it inside Emacs by doing M-x evil-mode, then you have Vim inside Emacs. Or use Vim, but the experience isn't as complete w.r.t. tooling[3]. There's always Spacemacs as well[1].
I feel embarrassed while reading your comment as a Rust proponent... Promoting Rust is great at times, but this particular article doesn't really have anything related to Rust. It is true that Rust was much influenced by OCaml, but the influence is not to a degree of calling it a "dialect". I'd say F# is much more likely a dialect of OCaml.
It really doesn't have that much in common with Haskell either. It's designed by people who are not oblivious about PL stuff, but it's still pretty thoroughly in the C/C++ world in terms of both syntax and semantics.
It's not a bad thing, but Rust has very little in common with Haskell/Ocaml; aside from stealing a couple of good ideas.
I would say Rust's type system has a lot more in common with Haskell/Ocaml than with C++, at least, although it's not quite as flexible as what Haskell offers (a lack of HKT is painful sometimes).
I think the similarities are mostly superficial. I mean it has (local) type inference, ADTs, and traits (which are sooooorta like type classes). But, as a Haskell programmer, the Rust type system feels very foreign.
No typeclasses (and associated goodness), GADTs, HKTs, Monadic IO, first class functions, generic deriving, higher rank types, existential type, etc. These are bread-and-butter features in day-to-day Haskell work. Rust's type system isn't powerful enough to build the vast majority of the tools that Haskell programmers use every day.
I don't mean this as a criticism; The Rust design seems solid. But different priorities lead to different trade-offs, and the end result is a very different type system.
Traits do a lot of what one can do with typeclasses (they're mostly just different names for the same thing), what differences are you thinking of?
Also, traits objects are existential types, and closures & functions are as first class as they are in Haskell (main difference is a bit more verbosity).
> Is there a good reason to say that Rust is an OCaml dialect?
There is, maybe, grounds to say that all languages with S-expressions, first class functions and garbage collection are just a type of lisp.
But I would not say that all languages with strong static typing, some form of type inference, algebraic data types, patterns matching and functional programming features, are a dialect or OCaml, or ML.
Once you want to use some of the more advanced features (Modules and Functors come to mind), you can switch back to OCaml relatively easily since they are so similar.