Remix.run Logo
4ad 2 hours ago

Other commenters have already expressed their opinion about the shallowness and inadequatenessof the article, so I will touch on a different, more technical point.

The author doesn't understand why OCaml (and Haskell, and many HM-derived languages) have let ... in ... at all, as opposed to having, say, just lambdas. That's because of a feature of Hindley–Milner type systems called let-polymorphism[1].

This is hard to see in OCaml if you are not intimately accustomed with HM type systems because definitions always use let, but in Haskell it's immediately clear that something more interesting is happening because regular definitions do not use let.

F#, which has been heavily inspired[2] by OCaml got rid of the in, rather it uses indentation to do automatic in insertion[2]. OCaml does not want to be indentation-aware.

[1] https://en.wikipedia.org/wiki/Hindley–Milner_type_system#Let...

[2] https://fsharp.org/history/hopl-final/hopl-fsharp.pdf