3 ms·
Composition tends to lead to more code reuse. And to more code that's still usable in unpredictable future. Over time your whole inheritance model often turns
by vardump 7y ago
Composition tends to lead to more code reuse. And to more code that's still usable in unpredictable future.
Over time your whole inheritance model often turns out to be no longer viable, when the basic assumptions made years ago are no longer valid.
Worse, because of all of the accumulated cruft, you might not even be able to change the shape of the monster.