4 ms·
> it seems to be working pretty okay. These things have a tendency to balloon out of control over time. I've seen class hierarchies start out very benign. Conv
by ericelliott 12y ago
> it seems to be working pretty okay.
These things have a tendency to balloon out of control over time. I've seen class hierarchies start out very benign. Convenient and well-designed, even.
But as the codebase grows and new objects need to be modeled, it inevitably gets stretched beyond the limits of its original design, and that's where things start to crumble.
Also, the more layers of inheritance there are, the more brittle the code becomes due to tight coupling between child and parent classes. Super calls start to turn into a tangled nightmare.
Here's a different perspective on the same topic: http://berniesumption.com/software/inheritance-is-evil-and-must-be-destroyed/ http://berniesumption.com/software/inheritance-is-evil-and-m...