3 ms·
Evolve your hierarchy is a really good read for everybody, not only game programmers. It shows in a very convincing way why the classic Cat : Animal inheritance
by Too 14y ago
Evolve your hierarchy is a really good read for everybody, not only game programmers. It shows in a very convincing way why the classic Cat : Animal inheritance model taught in every Java-school doesn't work when things scale up and proposes a better alternative.
- cpeterso 14y agoReading this Starcraft story and "Evolve Your Hierarchy" reminds me that, in retrospect, most of the class inheritance hierarchies in my student and early professional projects were bad design. These days, I think implementation inheritance is a code smell.
- Evbn 14y ago"Prefer composition over inheritance" is an item in Bloch's Effective Java.