News for hackers. Stuff that matters.
Re:Hindley-Milner Type Inference (2012) by eru on Saturday July 11, 2020 @12:44AM (#23799577)
You can get OCaml to behave like 2, but you need eg Generalised Algebraic Datatypes or some magic with modules to do so.

See https://blog.janestreet.com/why-gadts-matter-for-performance... and https://blog.janestreet.com/more-expressive-gadt-encodings-v... for why you'd sometimes want the behaviour in 2.

(I do agree, that that behaviour is a bad default.)

There are no comments on this comment yet.