Haskell Classes

In dynamically typed languages object-orientation is nice but not necessary to reperesent arbitrarily complex data. Weakly typed compiled procedural langauges (of which C is the most prominant) can deal with the bit representation of memory directly and avoid the strictures of strong typing. C++ is weirdly both more and less flexible than C. Nothing matches the rigours of Haskell. Data definitions in Haskell (and other typed functional programming languages) are usually easier to use than structures in C but cannot be circumvented at all. Representing your data in Haskell requires careful planning. In the standard Haskell98 there are no ways to represent data polymorphically which makes it odd that Haskell has a way of defining “classes” that sound a lot like an object-oriented class. It isn’t; it does work somewhat like C++.

C++0x will include the STL notion of “concept” into the syntax of the language. Concepts are a kind of meta-type that corresponds closely to Haskell’s class.