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. The paper is written using mathematical notation that can be intimidating, but I think it will make for a good discussion.
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. The paper is written using mathematical notation that can be intimidating, but I think it will make for a good discussion.