3 ms·
It's because Hindley-Milner doesn't play well with subtyping. You do get subtyping in Ocaml with modules and "module types", but in that case you are explicitl
by acchow 6y ago
It's because Hindley-Milner doesn't play well with subtyping.
You do get subtyping in Ocaml with modules and "module types", but in that case you are explicitly spelling out the module types. They're not inferred.
- zenhack 6y agoNote that there's some more recent research that bridges the HM-subtyping gap: http://stedolan.net/research/mlsub.pdf http://stedolan.net/research/mlsub.pdf So this can be done, though afaik there's still some theory work to be done to combine it with some of the more advanced features in modern FP languages (e.g. higher rank types)