ML Modules for Mere Mortals

November 12, 2026 November 13, 2026 14-minute read 2946 words

Programming Languages • Modules

I think everyone can agree code needs to be modular. Modularity lets us reason locally about our code no matter how big it grows. However, no one seems to agree on how code should be modular. There are a bunch of different approaches and each new language seems to bring their own spin on it.

Today we’re going to talk about a pretty old spin: ML Modules. ML here stands for Meta Language, as seen in SML and OCaml (and not machine learning). Despite SML first appearing in 1983, ML Modules have not caught on. OCaml is the sole production language you’ll find with an ML module system, and at the height of its popularity it’s niche.