Hacker News new | ask | show | jobs
by yodsanklai 1147 days ago
It's my favorite language by far!

Pros: type safe, GC, fast, (arguably) a simple and practical language if you have a functional mindset (much simpler and pragmatic than Haskell IMHO).

Cons: it's a niche language, so tooling/libraries/online help aren't on par with more mainstream languages. No canonical standard library (different codebases will use different standard libraries and even disagree on pervasive functions such as List.map). Whenever the code uses monad (e.g. concurrency monad / error handling), I find the language loses its simplicity.

Maybe it's true of every languages but I'm disappointed by some OCaml codebases where often two extreme cohabit

1. people who don't know the language and don't write idiomatic code (like, refusing to write .mli, abusing imperative features)

2. OCaml experts who over-engineer things and want to use the latest features and make the code hard to read/maintain

In a professional settings, it can be hard to have these two populations coexisting, and people tend to be quite opinionated when it comes to such languages (love it or hate it -> it's often a source of struggle).