8

Haskell's type classes are a very powerful tool and give Haskell a great expressive ability, compared to functional languages that don't have them. When were they invented, and who invented them?

2 Answers 2

11

The paper which introduced type classes was "How to make ad-hoc polymorphism less ad-hoc" by Wadler and Blott in 1988. In the paper, they mention that type classes were discovered during the standardization work on Haskell, however the wording doesn't make it clear who discovered them. (One would assume it was the authors, but that isn't said explicitly.)

They mention some prior art by Stefan Kaes.

The Acknowledgement section says:

The important idea that overloading might be reflected in the type of a function was suggested (in a rather different form) by Joe Fasel. For discussion and comments, we are also grateful to: Luca Cardelli, Bob Harper, Paul Hudak, John Hughes, Stefan Kaes, John Launchbury, John Mitchell, Kevin Mitchell, Nick Rothwell, Mads Tofte, David Watt, the members of the Haskell committee, and the members of IFIP 2.8.

4

Comically, type classes were invented by accident, when one researcher misunderstood another. The paper A History of Haskell: Being Lazy With Class, section 3.3, states:

Type classes were introduced to the Haskell Committee by Wadler in a message sent to the fplangc mailing list dated 24 February 1988

[...]

Wadler conceived of type classes in a conversation with Joe Fasel after one of the Haskell meetings. Fasel had in mind a different idea, but it was he who had the key insight that overloading should be reflected in the type of the function. Wadler misunderstood what Fasel had in mind, and type classes were born! Wadler’s student Steven Blott helped to formulate the type rules, and proved the system sound, complete, and coherent for his doctoral dissertation (Wadler and Blott, 1989; Blott, 1991). A similar idea was formulated independently by Stefan Kaes (Kaes, 1988)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.