3 ms·
No, there's just not that many true instances of the is_a relationship outside of shapes. Reuse is often better achieved via composition rather than complex up-
by bruceboughton 13y ago
No, there's just not that many true instances of the is_a relationship outside of shapes. Reuse is often better achieved via composition rather than complex up-and-then-down-again virtual call chains.
- coldtea 13y ago>No, there's just not that many true instances of the is_a relationship outside of shapes. I was talking about if the majority shuns inheritance or not [it does not]. Not whether it's the correct way to go. That said, there's lots of instances of is_a relationship. Anywhere where you have different types of something. A work hierarchy for example. While composition might work for the methods we want to have, conceptually a manager is not someone who HAS an employee (composition), he IS-AN empoyee. GUI widgets. Game sprites. Vehicles. Animals. Simulation objects. Consider how the "semantic web" is all about taxonomies -- put everything into taxonomies.