[Haskell-cafe] How to fulfill the "code-reuse" destiny of OOP?

Sebastian Fischer sebf at informatik.uni-kiel.de
Wed Jan 13 05:14:59 EST 2010


On Jan 13, 2010, at 11:00 AM, Sittampalam, Ganesh wrote:

> Type classes allow you to dispatch based on return type, and on the  
> instantiations of generic parameters. Neither of these things is  
> reasonably possible with interfaces.

There is recent work that generalises the capabilities of interfaces  
in Java:

     http://www.informatik.uni-freiburg.de/~wehr/publications/WehrLammelThiemann2007.html
     http://www.informatik.uni-freiburg.de/~wehr/publications/WehrThiemann2009.html
     http://www.informatik.uni-freiburg.de/~wehr/publications/Wehr2009.html

Seeing type-class features in Java disguise highlights the differences  
between the two concepts that you mention.

Sebastian


-- 
Underestimating the novelty of the future is a time-honored tradition.
(D.G.)



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20100113/9e181b8d/attachment.html


More information about the Haskell-Cafe mailing list