Learning OCaml
Learning a new programming language has always been a fun exercise. It often provides a new perspective for thinking about programs and reveals insights into the design decisions and trade-offs in terms of what is simple and what is easy.
My first introduction to the ML Family of languages was through the highly recommended Programming Languages course series by Dan Grossman. This course presents different ways of thinking about and writing programs using SML, Racket, and Ruby. As part of the coursework, I was introduced to SML and I immediately took to it. Its clean, readable Python-like syntax without the explicit type annotations of Java, despite being strongly typed, enabled by the Hindley-Milner type inference.
I recently started my sabbatical from work. Learning new things and the process of getting better at something always gives me joy. To that effect, I decided to learn a new language and apply it to solve some problems/puzzles. You know, just for kicks. With no AI-assisted coding of course. While thinking about languages, I remembered my experience with SML. This time though, I wanted to try out the more pragmatic cousin OCaml instead.
The language has been easy to pick up and the tooling seems mature. I’ve started working through Advent of Code problems from last year. Looking forward to the journey.