Thread: Why OOP?
View Single Post
Old Oct 13th, 2007, 5:27 PM   #42
Arevos
Programming Guru
 
Arevos's Avatar
 
Join Date: Aug 2005
Location: England
Posts: 1,499
Rep Power: 5 Arevos is on a distinguished road
Quote:
Originally Posted by Darkhack View Post
Applications that use inheritance are simply harder to maintain. With procedural programming, functions are very predictable. With inheritance there is a LOT of ambiguity as to which is which and in what ways does this subclass override the parent class. Multiple inheritance is the biggest joke of all. With procedural programming, once you are familiar with the codebase, you can be quite productive. With multiple inheritance in use, you will be constantly checking the documentation to see which variables and methods are overridden.
How much experience do you have maintaining large code bases? In my experience, inheritance done right makes maintenance a whole lot easier, especially when dealing with reasonably large applications.

With a sufficiently large codebase, it's often difficult to hold the complete layout in your mind at once. But if the system uses a sane amount of inheritance, you can get a good idea of what a class does by looking at what classes it inherits from. There have been times when I've come across an unknown class, but been able to infer it's general purpose from its ancestors.

Also, inheritance reduces repetition, which is always a good thing to have.

I think that you don't really have enough experience to judge the merits of OOP. If your sole experience of OOP is C++ and Java, then I suspect that you don't really have a complete understanding of OOP. In Alan Kay's words:

Quote:
I invented the term "Object-Oriented", and I can tell you I did not have C++ in mind.
Arevos is offline   Reply With Quote