Modular Implicits

Probably it should be named OCaml anymore, just a very powerful language that is compatible with OCaml.

Except that OCaml is currently somewhat deficient, and could really use having the module language be made smarter and more intuitive. This isn’t obvious when you evaluate OCaml in a vacuum, but when compared to its state-of-the-art competitors haskell and rust, it’s clear that the ease of use isn’t quite where it should be. The reason people have been wishing for modular implicits is that they’ve used type classes and seen how powerful and easy type-based dispatch is (another alternative is OOP mixins as implemented in Scala). If someone offered me to ditch OCaml’s current, complex module system and use type classes instead, I would instantly take that deal, and I suspect most users would, too.

2 Likes