Linked by Eugenia Loli-Queru on Mon 10th Apr 2006 03:58 UTC
General Development Good news! Inheritance and polymorphism can facilitate more concise code, which reduces waste throughout the lifecycle of a C++ product. By pushing more generic code into base classes, you can help reduce application code clutter as well as cutting down on code duplication. In this article, software consultant Stephen Morris insists that less code means less testing, lower maintenance costs, and easier upgrades.
Thread beginning with comment 113738
To read all comments associated with this story, please click here.
Re: OO can lead to other pitfalls
by sanders on Tue 11th Apr 2006 07:23 UTC
sanders
Member since:
2005-08-09

Just like procedural programming can lead to 1000-line functions making your code unmaintainable, overzealous OO-ers tend to cripple the project by making dozens of classes which are essentially the same, "just in case".

IMHO this is even worse than the 1000-line function, because there at least you can lock yourself in your office and read it, whereas the 10-levels-of-inheritance-all-adding-nothing will make you lose the overview very quickly.