I highly recommend checking it out. The great thing is that it's not the fancy features that (pushing the boundaries) that make it a good language. The core of ML is the real gold. I content that it would be a good choice as a default programming language for most programmers.
If you are coming from Python, ML is going to seem pretty weird. The code doesn't look too different but the compiler will be yelling at you a lot. Press on. (As a big fan of Python,) my feeling is that with Python it's easy to start programs and with OCaml (ML) it's easy to finish them.
If you are learning ML, in the beginning try to avoid using fancy features and really avoid non-functional features (i.e. mutable variables). These have a place but most of the time aren't needed. Using them gets in the way of learning this new great style.
I've heard good things about Real World OCaml (haven't read it myself - came out after I'd learned the language).
> I content that it would be a good choice as a default programming language for most programmers.
Strongly agree. I now write all of my everyday “glue code” in F#, and use C# for the low-level algorithmic/library stuff. This is directly opposed to the received wisdom, but I find that it works far better (although I think in ML no matter what language I’m using).
My theory as to why this works is that designing and writing robust “line-of-business apps” is really tantamount to designing and implementing a protocol, which, in turn, requires writing something like a parser or recognizer, and it just so happens that ML is really good for writing parsers and recognizers.
> my feeling is that with Python it's easy to start programs and with OCaml (ML) it's easy to finish them.
I think that's the thing that keeps me interested in OCaml and is making me interested in F#: the core ML language is not very complex, and it can carry you a long way before you start requiring advanced features. I wrote a few compilers in OCaml using only the core language and very simple modules (basically just signature + struct, no functors) and the end result was very easy to read and modify. I think very few languages can make a similar claim: either the language doesn't get you all the way and you need external help (e.g. C and its pre-processor) or overshoots into too much complexity (e.g. C++).
ML is not a language for all tasks (I am learning Rust for those times when OCaml is not appropriate), but I think that ML languages could be used beneficially in many more applications today.
Yes it seems to attract a high-end CS crowd - there's lots of graduate-level CS assumption going on in some of the tutorials. But one of the things I really appreciate is the REPL ("toplevel") which let's you hack around and mess with examples in an interactive way. So good for a compiled language.
I have had a quick skim (10 - 15 minute reads at a random points, until I have time to read it properly) of Real World Ocaml.
So far it looks great, and is very pragmatic and also covers useful tools for working in Ocaml (imho that should be in every modern specific programming language book, but it probably will date faster the rest of the book).
If you are coming from Python, ML is going to seem pretty weird. The code doesn't look too different but the compiler will be yelling at you a lot. Press on. (As a big fan of Python,) my feeling is that with Python it's easy to start programs and with OCaml (ML) it's easy to finish them.
If you are learning ML, in the beginning try to avoid using fancy features and really avoid non-functional features (i.e. mutable variables). These have a place but most of the time aren't needed. Using them gets in the way of learning this new great style.
I've heard good things about Real World OCaml (haven't read it myself - came out after I'd learned the language).