3 ms·
I agree. As with most tools in programming, not every mechanism of a language should be employed aggressively unless it truly improves your application architec
by keerthiko 8y ago
I agree. As with most tools in programming, not every mechanism of a language should be employed aggressively unless it truly improves your application architecture.
Inheritance is very useful especially in game programming (in context of OP), and hardly ever anywhere else. In games it's useful to be able to pass around references to an object or have systems that manage pools of objects at exactly the hierarchy of inheritance that makes the most sense for the manager of that system. Not many other applications need to pass around objects between various hierarchical management systems as much.
I think inheritance shouldn't be taught in intro-level programming classes. It's presented as "how to do all things in OOP, shove all the things into multi-level child classes" when really it should be "here's an advanced concept for situational architecture optimization". It defeats the purpose when you do multiple levels of inheritance and no longer ever use the parent classes for anything.
- goalieca 8y ago> Inheritance is very useful especially in game programming (in context of OP), and hardly ever anywhere else. This is because OOP is good at modelling objects and games are modelling objects.