Trying OCaml

Published on 2022-12-27

I used my list of requirements for a “dream” programming language to create a spreadsheet. I use that spreadsheet to calculate a score for each language based on how well it fits my list of requirements.

Two languages so far score the highest:


Gleam is so close to what I’m looking for. It only misses one mark: native executables[1]. Gleam runs on the Erlang VM or compiles to JavaScript, which is a showstopper for the kind of little hobby command line programs I want to write. However if I ever decide to create a service that can be deployed to a server, I’ll be super excited to try out Gleam.


The next best contender I could find for the kind of software I want to write is OCaml. I must say, I have never enjoyed writing / over-engineering a hello world program so much. The language does sadly use exceptions for error handling, though thankfully exceptions are no longer considered idiomatic.

I’m going to continue playing with it. We’ll see where this goes.


If you have a Mastodon account, you can reply to my post on Mastodon.


  1. Well, Gleam also misses the object capabilities requirement, but almost all other languages miss that feature as well. As of this writing, the few languages that have object capabilities are in the experimental stage. ↩︎

Other Posts