3 ms·
Even though the suggested model is ultimately much more flexible, I'm surprised the article didn't even mention multiple inheritance as the most obvious solutio
by comex 15y ago
Even though the suggested model is ultimately much more flexible, I'm surprised the article didn't even mention multiple inheritance as the most obvious solution to the dialog/animated problem. Not all the world is Java.
- forrestthewoods 15y agoEek! Multiple inheritance is not implemented in most programming languages for good reason. In general it is wise to favor composition over inheritance.
- zura 15y agoIt is deciding between "IS A" and "HAS A". In general, there is no such a rule that says: "HAS A" is wiser. It depends on the use case.
- Ygor 15y agoRelated, an interesting article: IS-A IS-A HAS-A http://weblog.raganwald.com/2008/03/is-is-has.html http://weblog.raganwald.com/2008/03/is-is-has.html
- WhaleBiologist 15y agoInheritance is usually the tightest form of coupling in a programming language. It is also usually misused horribly. A component/plugin architecture for game objects wins hands down.