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

Mads Lindstrøm mads_lindstroem at yahoo.dk
Mon May 4 11:01:16 EDT 2009


Bulat Ziganshin wrote: 
> Hello Paolo,
> Monday, May 4, 2009, 2:05:44 PM, you wrote:
> > Martin Odersky advocates the OO features of the scala language
> > proposing an interesting problem where the OO approach seams
> > valuable.
> 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

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, ...

/Mads Lindstrøm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20090504/16fb12d0/attachment-0001.bin

More information about the Haskell-Cafe mailing list