News for hackers. Stuff that matters.
Re:Hindley-Milner Type Inference (2012) by yawaramin on Saturday July 11, 2020 @01:29AM (#23799781)
OCaml also has a really good subtyping implementation in the often-used polymorphic variant system. I'll just quote from http://roscidus.com/blog/blog/2014/02/13/ocaml-what-you-gain... :

> Their real purpose is to support subsets and supersets, which are useful all over the place.

And indeed they are super useful, e.g. I am using them to implement functions that deal with web responses: some can deal with only HTTP responses, some with only WebSocket responses, and some with either. All completely type-safe and extensible.

There are no comments on this comment yet.