Comment on Why composition is often better than inheritanceComments−teamhappy12yIt's pretty much the same example I used here a couple of days ago: https://news.ycombinator.com/item?id=7976227Game development seems to be the poster child for composition over inheritance.Here's a lengthy article that explains it way better (IMHO): http://gameprogrammingpatterns.com/component.html
Comments
It's pretty much the same example I used here a couple of days ago: https://news.ycombinator.com/item?id=7976227
Game development seems to be the poster child for composition over inheritance.
Here's a lengthy article that explains it way better (IMHO): http://gameprogrammingpatterns.com/component.html