About
Why Ocaml? Why Ship of the Desert?
I've been a Scala developer for around 8 years now (with a sabbatical year) mainly because I strongly believe some functional programming concepts lead to more robust code.
I love Scala, but a lot of times developing in it feels like constantly fighting its own tooling, it can get slow pretty quickly and there still are quite a few quirks to iron out.[^1]
So I went looking for a language and ecosystem that wouldn't fight me. I tried Rust (slow compiler, steep learning curve), Python with type hints (hints aren't types), F# (great language, clunky .NET integration), and Go (no Option, no Result). Each had tradeoffs I couldn't live with. I value strong type systems and fast tooling too much.
There were a few others, but these were the ones I actually spent considerable time learning.
Finally, why OCaml?
What sold it for me were:
- looks clean, very expressive (there's a few things to get used to, but it didn't take long)
- insanely productive, it now has good and really fast tooling (dune, opam, lsp)
- has the functional features I need (missing type classes, but that just requires a slight mind shift)
Its biggest drawback is the ecosystem itself, there's a few big companies and really great individual contributors, but the lack of libraries can be a problem for certain projects.
All in all, OCaml gave me back the joy of programming. Fast tooling, expressive syntax, and a type system that helps instead of fights. The ecosystem is small. That's real and it can be a problem. But I'd rather build the libraries I need in a language I love than fight tooling in a language with more packages. If you want practical, project-based OCaml content - the kind I wish existed when I started - that's what Ship of the Desert is for.
[^1]: This is not me picking on the awesome devs that develop these tools (especially when I have contributed nothing), on the contrary, I have a lot of respect for them, but that's how I feel when working with the language.