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:[email protected] _______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
