2 ms·
Disagreed. The techniques explained in the article worked quite well for me, and resulting projects are well-structured and very well maintainable for years. A
by dimonomid 11y ago
Disagreed. The techniques explained in the article worked quite well for me, and resulting projects are well-structured and very well maintainable for years.
As ever, we have to apply common sense: as I mentioned in the article, 1-level inheritance is quite good, or maximum 2, but if we have more, it gets too verbose. Luckily, for most cases, 1-level is quite enough to create common API and reusable modules.
Maybe you overuse it? Of course if you try to build huge hierarchies like this, you most likely will end up using typecasts in client code, and the entire thing will quickly become a mess. The article proposes solutions that don't have typecasts in client code.
As I said before, we should apply common sense. Engineering is all about tradeoffs. If I were you, I wouldn't argue against any approach as aggressively as you just did.