[Haskell-cafe] Interesting Thread on OO Usefulness (scala mailing list)

Bulat Ziganshin bulat.ziganshin at gmail.com
Mon May 4 14:51:47 EDT 2009


Hello Mads,

Monday, May 4, 2009, 7:01:16 PM, you wrote:

>> i know two problems in Haskell/GHC that require OO-loke features -
>> extensible exceptions and GUI widget types hierarchy

> Yes, type hierarchies require OO.

> But, do we really need to represent different widget-types in a
> hierarchy?

> An alternative to a big hierarchy would be to let different widget-types
> implement different type classes. We could have type classes like
> MouseEvents, KeyboardEvents, Activated, ...

there is obvious difference between OOP and type class hierarchies -
OOP ones includes data fields. (somewhat close functionality provided
by extensible records, but they are not in GHC nor provide strong
type-checking)

this means a lot of boilerplate code written, i.e. we lose compared to
OOP


-- 
Best regards,
 Bulat                            mailto:Bulat.Ziganshin at gmail.com



More information about the Haskell-Cafe mailing list