[Haskell-cafe] C++ class = neutered (haskell class + haskell existential)

Gabriel Dos Reis gdr at integrable-solutions.net
Sun Aug 20 00:29:29 EDT 2006

Bulat Ziganshin <bulat.ziganshin at gmail.com> writes:

| Hello John,
| Friday, August 18, 2006, 5:16:45 AM, you wrote:
| > There is a major difference though, in C++ (or java, or sather, or c#,
| > etc..) the dictionary is always attached to the value, the actual class
| > data type you pass around. in haskell, the dictionary is passed
| > separately and the appropriae one is infered by the type system.
| your letter is damn close to that i wrote in
| http://haskell.org/haskellwiki/OOP_vs_type_classes
| although i mentioned not only pluses but also drawbacks of type
| classes: lack of record extension mechanisms (such at that implemented
| in O'Haskell) and therefore inability to reuse operation
| implementation in an derived data type, lack of downcasting mechanism
| (which bites me all the way), requirement to rebuild dictionaries in
| polymorphic operations what is slow enough

I would appreciate if you could revise the comparison based on the
material I just sent, that illustrates my earlier comments.

More information about the Haskell-Cafe mailing list