Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.


Inheritance 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.


Eek! Multiple inheritance is not implemented in most programming languages for good reason. In general it is wise to favor composition over inheritance.


It 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.


Related, an interesting article: IS-A IS-A HAS-A

http://weblog.raganwald.com/2008/03/is-is-has.html




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: