The Great OOP Misnomer


What’s the biggest minomer with OOP?

Object-oriented programming is all about objects.

False.  Objects are instances of classes and only exist at runtime.

Object-oriented programming is all about class design.  It should have been named Class Oriented Programming (COP).

Bertrand Meyer asked this question in his classic tome on object-oriented design:

Do we design for runtime or design time?

Answer:

Object-oriented programming is about design-time constraints.  Concepts such as reuse, maintainability, encapsulation, information hiding, and inheritance are all design-time constructs.

In fact, there are multiple designs that end up with the same runtime layout (objects) but that aren’t all considered good object-oriented design (you can’t judge the class design by what the object looks like at runtime).

The lack of focus on runtime issues is, in my opinion, the greatest weakness of OOP.

This was one of the issues that the Component-Orientation crowd, such as Szyperski, capitalized on.

What’s a Transaction?