Joined: 2019-03-12
Rep: โญโญโญโญโญ
Jane Street Fangirl
Fellow cat girls of the functional persuasion, I have had it up to here with the Haskell propaganda machine. It is time for a civilized, measured, and completely unbiased discussion. I will go first.
OCaml is simply better. I will now enumerate the reasons with the rigor befitting this esteemed community.
1. PRAGMATISM vs IVORY TOWER NONSENSE
OCaml is impure and strict. You can do effects anywhere you want. You do not need to wrap your entire life in an IO monad just to print "nya~" to stdout. Real programs have side effects and OCaml respects that.
2. THE MODULE SYSTEM
OCaml's module system โ with first-class modules, functors, and module signatures โ is a tour de force of language design. It gives you parameterized abstractions without needing the entire MTL stack and 47 language pragmas. You get explicit, readable, traceable code structure.
3. OCaml 5 ALGEBRAIC EFFECTS
We don't need monads anymore. OCaml 5's algebraic effects let you write direct-style async code without the let*-hell that even we OCaml people admit is a little cumbersome. Eio is beautiful. The future is now.
4. PERFORMANCE
Strict evaluation = predictable performance. No thunks leaking memory at 3am. No needing to annotate ! everywhere because GHC decided your integer is now a lazy box of sadness. See benchmarks thread.
Haskell people, your rebuttal please. Keep it civilized. (=^.^=)