Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



Note that there's some more recent research that bridges the HM-subtyping gap:

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)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: