3 ms·
I don't know much about this topic but I've heard that Hindley-Milner's type inference has also drawbacks as it doesn't work well with partial compilation and s
by renox 8y ago
I don't know much about this topic but I've heard that Hindley-Milner's type inference has also drawbacks as it doesn't work well with partial compilation and subtyping.
So does the benefits outweight the drawbacks?
- Drup 8y agoHM type inference works perfectly fine with separate compilation and/or partial files (whichever you mean). See the OCaml tooling for a concrete demosntration. Subtyping is a fairly large domain, and it really depends what you mean. There are cases where it works fine (again, see OCaml) and other where it's more problematic (see Scala). In any case it's not really HM anymore, it needs to be more.
- chombier 8y agoAs far as I know, subtyping with polymorphism looks much better since Stephen Dolan's thesis on Algebraic Subtyping http://lambda-the-ultimate.org/node/5393 http://lambda-the-ultimate.org/node/5393