Introduction to OCaml
For those considering learning OCaml, I thought I&#x27;d share my (admittedly biased) thoughts about the language as a long-time user (well... roughly 4.5 years).<p>Out of all the languages I&#x27;ve learned, OCaml is one of the few that I would consider to be a &quot;sweet spot&quot; language. A lot of people seem to have one language that they tend to fall back to when they&#x27;re not sure what else to use because they find it most practical, whether or not they enjoy using it as a language. Out of the languages I know, it&#x27;s pretty much between Java and OCaml for me, with OCaml being much more ergonomic. Writing OCaml code is much more relaxing than most other languages I&#x27;ve encountered because everything is quite predictable once you know the core language, but it features a multitude of tools that you can use to approach any task (OOP, modules, functional programming, imperative, low-level, high-level, metaprogramming, etc.). I also think that OPAM is one of the best language package managers around (for example, it comes with native support for having multiple copies of the OCaml toolchain installed in parallel). Finally, Reason+BuckleScript have become really nice and for web programming I think they offer one of the best options.<p>There&#x27;s still a few things that are far from perfect, though. OCaml still lacks an equivalent to Haskell&#x27;s typeclasses and that makes designing good generic libraries a pain (it&#x27;s still possible using modules+functors, but it takes a little boilerplate because it&#x27;s not implicit). As a side effect of this, the standard library is pretty fragmented between the official one (aka &quot;things we used to write the compiler so you can keep them if you want&quot;), the Batteries library (which is essentially what the standard library would be if the official one was &quot;finished&quot;), and Jane Street&#x27;s Core library (which replaces the standard library altogether). The problem is that this extends into basically all of OCaml. For such a small language, there&#x27;s little room for all the competition and that means that a lot of libraries either don&#x27;t exist or aren&#x27;t actively maintained. That said, most libraries are a breeze to implement and for the real-world code that I do write, they are hardly a distraction 99% of the time. The only other downside is that OPAM isn&#x27;t compatible with NPM, which means that BuckleScript (the OCaml-&gt;JS compiler) has a totally separate ecosystem from the native compiler.<p>Tl;dr, if you&#x27;re looking for a very general language to learn and don&#x27;t care about having to implement your own libraries, OCaml is one of the best choices out there. If you&#x27;re doing JS programming, it&#x27;s worth taking a look into ReasonML&#x2F;BuckleScript.<p>If you&#x27;re interested, feel free to ask me any questions about the language&#x2F;ecosystem&#x2F;learning.