6 ms·
> There exist many type inference algorithms, the best known one is the so-called Algorithm W. Is this correct? I dug out Milner's paper [1] where he states th
by p0llard 6y ago
> There exist many type inference algorithms, the best known one is the so-called Algorithm W.
Is this correct? I dug out Milner's paper [1] where he states that Algorithm J is more efficient (which was what I had been led to believe), but that Algorithm W is more suited to functional (as opposed to imperative) implementations.
Edit: Actually I think I'm parsing this sentence incorrectly, "best known" means literally that as opposed to "most efficient known".
[1] https://homepages.inf.ed.ac.uk/wadler/papers/papers-we-love/milner-type-polymorphism.pdf https://homepages.inf.ed.ac.uk/wadler/papers/papers-we-love/...
- ThreeFx 6y agoBest known is indeed meant as "most widely known" (although that may be true for only my little bubble). I think it's taught in most type theory / formal methods courses though. If anybody has facts for/against this claim I'd be happy to update the page.
- kevincox 6y agoIt might make sense to update to "most widely known" to avoid that source of ambiguity. You can take that sentence as ((best known) algorithm) or (best (known algorithm))
- p0llard 6y agoYeah I think you're definitely right, and Algorithm W is how HM was introduced to me when I studied it. kevincox's comment sums up my misunderstanding.