3 ms·
Interesting, didn't know that about Swift compiler. What does constraint solving provide that Hindley-Milner doesn't? My understanding of HM was that it's reduc
by smikhanov 10y ago
Interesting, didn't know that about Swift compiler. What does constraint solving provide that Hindley-Milner doesn't? My understanding of HM was that it's reducible to the system of linear equations, therefore solvable in linear time. What is that that Swift type checker requires that HM doesn't provide?
- Sharlin 10y agoHM has no concept of subtyping or overloading, I think. Scala has both of those and cannot do full type inference, only local inference.
- deleted 10y ago[deleted]
- solidsnack9000 10y agoIt is worth considering that neither Haskell nor Scala are strictly Hindley-Milner.
- trurl 10y agoType inference for HM is actually exponential, due to generalization for let-polymorphism. You're probably thinking of inference for a language with just simple types.