text: OOP vs type classes
  From HaskellWiki
   an object?
  You all know this OOP motto - "everything is an object". When I programmed in C++, it was really hard to do it without classes. But when I -the same programmer, John de Mac-Lee - use Haskell, it's hard to find open vacancies for type classes. Why is it so different?
  C++ classes pack functions together with data to make it possible to use different data representations via the same interface. As long as you need any of these facilities, you are forced to use classes. Although C++ supports alternative ways to implement such functionality (function pointers, discriminated unions), they are not as handy as classes. Classes are also the sole method of hiding implementation details. Moreover, classes represent a handy way to group related functionality together, so I found myself sometimes developing classes that contain only static functions just to group them into some 'package'. It's extremely useful to browse the structure of large C++ project in terms of classes instead of individual functions.
  Haskell provides other solutions for these problems.O languages. Unfortunately, it's again impossible in Haskell. Instead, the structure of a program is typically rendered in module hierarchy and inside module - in its export list. Although Haskell language doesn.
  2 Type classes is a sort of templates, not classes
  At this moment C++/C#/Java languages have classes and templates/generics. What is a difference? With a class, type information is is passed in form implementation of "==" and "/=" operations for objects of type 'a'. If there are several class constraints, a dictionary for each is passed.
  If class has base class(es), the dictionary tuple also includes tuples of base classes dictionaries, so more like the templates, not classes! As with templates, type information is part of operation, not object! But while C++ templates are really form of macro-processing (like Template Haskell) and at last end generates non-polymorphic code, Haskell's using of dictionaries allows run-time polymorphism (explanation of run-time polymorphism? -what is this? a form of dynamic dispatch?)..
  3 Type classes vs classes
  Here is a brief listing of differences between OOP classes and Haskell type classes a function that requires base class from a function that requires subclass:
  f :: (Stream m s) => s -> m String show :: (Show s) => s -> String f s = return (show s)
  But downcasting is absolutely impossible - there is no way to get subclass dictionary from a superclass one
  3
  3.5 Downcasting is a mission impossible
  Selection between instances is done at compile-time, based only on information present at.
  3!
  3' neither 'b' dictionary. Even if orderings for apples and penguins are defined, we still don't have a method to compare penguins to apples!
  4 Other opinions
  >)