An overview of OCaml

A quick overview of the OCaml programming language and ecosystem. This is not a tutorial.

This article is targeted at programmers that already know mainstream languages such as Java and JavaScript at an intermediary level.

I’ll cover the basics of the OCaml language with examples and some theory sprinkled here and there. The goal is to give you a “feel” of the language.

If you’ve ever wondered

  • What functional programming looks like in practice
  • How functional languages represent objects
  • How they do asynchronous operations
  • How they even write real world code when everything is immutable

Then you’re about to get answers to all those questions and a whole lot more.

First of all, a quick description. OCaml is a functional programming language. It’s pragmatic: it aims for beautiful, expressive, immutable high level code, but recognizes that sometimes it’s necessary to drop down to imperative code in hot sections. Its syntax can appear radical at first, but it suits the language well. It’s a high level language that retains support for low level operations and excellent abilities to call C code transparently when needed. OCaml uses strong static typing.

Continue reading