Andy Dingley wrote:
Because Java supports interfaces. When you have interfaces, and
multiple interfaces, then the reason for needing multiple inheritance
disappears.
Can we say "is weakened" instead of "disappears"? When I think of a
class having to implement a huge interface (or more), I would be
grateful for having a standard implementation taking care of most of the
stuff and just override the stuff I'd like to work differently (if at all).
Granted, most Java interfaces I've ever met where relatively small, but
still. I'm just not a fan of saying "Interfaces are a replacement of
multiple inheritance" or the like.
Me nitpicking, nothing more. Also, if a more experienced programmer than
me wants to enlighten me on the topic: I'm open for it :).
It's an odds thing. Multiple inheritance is a pain most of the time, helpful
sometimes. Using the Java way of interfaces alleviates that pain for the most
part, but occasionally you have to work around it.