So, what would be a good terminology to differentiate between these two ways of doing inheritance?
I have stumbled upon this really interesting debate.
Regarding your question I think that Jeff M didn’t entirely get the point.
In my opinion the examples that you shown could refer to the Interface Segregation Principle (ISP) from SOLID principles.
- ‘designing types after what they are’:
Here designed classes are not following ISP and client is cluttered with interfaces it don’t need (e.g. poop) which results with mentioned earlier Gorilla-Banana problem as a side-effect:
class MurderRobotDog(MurderRobot, Dog):
2. ‘designing types after what they do’:
Here (Barker, Driver, Killer) are applied correct interface segregation, client gets exactly what he require.
class MurderRobotDog(Barker, Driver, Killer):