News for hackers. Stuff that matters.
Re:Game Development Essentials #1 - Don’t use inheritance fo... by lyudmil on Tuesday February 07, 2012 @09:02AM (#3561761)
This is good general programming advice beyond game development. If you think you need inheritance, you probably will be better off using composition because the general "is-a" rule of thumb is, in my opinion, a bad way to figure out if inheritance is required.

More in this old thread: http://news.ycombinator.com/item?id=1992745

In short, use composition and if inheritance is what you want instead, it will become obvious soon enough.

There are no comments on this comment yet.