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.)
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe