in reply to Re^2: Understanding 'Multiple Inheritance'
in thread Understanding 'Multiple Inheritance'

The heart of the big benefits from OO is encapsulation, not inheritance.
The heart of the big benefits from OO is polymorphism.

As you two demonstrated, this is obviously up for debate. Any authoritative statement either way is bound to be disagreeable to one person or another. In this case, though, I think you're both right.

A large part of good programming practice is finding the right abstractions for certain tasks. Polymorphism and encapsulation are both ways to abstract one thing or another, and I think objects are pretty good at doing both of those.

Incidentally, I usually use object oriented techniques more for encapsulation, as Tilly suggests, than polymorphism, but I think they are two sides of the same coin. You can have one without the other, but they're not mutually exclusive.

  • Comment on Re^3: Understanding 'Multiple Inheritance'