Speaker Deck

DeadCoders #1: Damas-Milner '82

by Alisdair McDiarmid

Published May 27, 2014 in Technology

Type inference is a common property of polymorphically typed programming languages, including Java, C#, Haskell, Scala, and F#. It allows the compiler to automatically determine the types of expressions, reducing the burden on the programmer, while still allowing for compile-time type checking.

The Damas-Milner paper describes the first algorithm ("Algorithm W") for inferring and assigning types in the ML polymorphic type system. The algorithm runs in near-linear time (with respect to program size), making it feasible for real-world use.

I think type inference is a fascinating concept, and Algorithm W is actually quite simple.