Hacker News new | ask | show | jobs
by p0llard 2135 days 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/...

1 comments

Best 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.
It 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))
Yeah 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.