3 ms·
If you absolutely must use subclassing, remember that whatever code is operating on your base class, would need to be able to operate all your subclasses in ide
by loopz 6y ago
If you absolutely must use subclassing, remember that whatever code is operating on your base class, would need to be able to operate all your subclasses in identical fashion without introducing accidental surprises and unanticipated side-effects. If this seems restrictive, please consider that changes to one unit of code should ideally be unrelated to other separate units of code, and how to better accomplish this. Later usage of subclassing can at any time introduce similar leakages of encapsulation and temptations around that theme.