News for hackers. Stuff that matters.
Re:Haskell: OOP vs type classes by ufo on Tuesday December 20, 2011 @12:50PM (#3374342)
I would say the closest OO analog to ADTs is the Visitor pattern: You first fix the number of classes and then implement the different functions (visitors)

This is in contrast with the normal OO polymorphism/method where you first define set of methods and then implement the different classes.

----------

Type classes are more of a thing of their own. The template comparison is apt and I have heard Type Classes are supposedly very similar to the "Concepts" proposal that did not get in C++0x.

There are no comments on this comment yet.