The Humpty-Dumpty Guide to OOP

Everybody knows that the best way to sound intellectual and demonstrate the superiority of your approach to that thing you do is to wrap it in a fancy-schmancy noun term. This works particularly well with a term that can be expressed as a three-letter acronym, or TLA. In programming we have a whole raft of different [A-Z]DD disciplines, the UML, CRC, and your DBA probably does SQL. It also explains why functional programming has taken so many decades to take hold: FP is 33% less appealing as a mere acronym of two letters (or ATL).

When your term is sufficiently arcane or abstract, you don’t even need to actually do the three-letter nouny thing. Just tell people that what you’re doing is the three-letter nouny thing, and let everybody fill in the gaps. In fact, they’ll probably agree that not only are you doing that thing but then so are they. Soon, everybody will be doing the nouny thing.

So it goes with Object-Oriented Programming. We can construct all sorts of definitions for Object-Oriented Programming the term, so that everybody can get in on this highfalutin concept without having to do anything. The best time to arrange for this wide collection of meanings is as early as possible. Let’s look at August 1981.

1. It’s all about messages.

The Smalltalk-80 system represents the current state of the object-oriented point of view as it has been reduced to practice by the Xerox Learning Research Group. The Smalltalk-80 system is composed of objects that interact only by sending and receiving messages. The programmer implements a system by describing messages to be sent and describing what happens when messages are received.

(“The Smalltalk-80 System”, Dave Robson and Adele Goldberg, BYTE Volume 6 Number 8 p.36)

2. Except when it’s not.

SIMULA allows users to create object-oriented systems, but uses the standard data/ procedure-oriented ALGOL language to provide numbers, booleans, basic data structures, and control structures.

(op. cit.)

3. Or maybe it is.

Instead of two types of entity that represent information and its manipulation independently, an object-oriented system has a single type of entity, the object,
that represents both. Like pieces of data, objects can be manipulated. However, like procedures, objects describe manipulation as well. Information is manipulated by sending a message to the object representing the information.

(“Object-Oriented Software Systems”, Dave Robson, BYTE Volume 6 Number 8 p.78)

4. Actually, maybe it means whatever you want it to mean.

The words “object-oriented” mean different things to different people. Although the definition given in this article may exclude systems that should rightfully be called object-oriented, it is a useful abstraction of the idea behind many software systems.

(op. cit., p.74)

5. But it definitely means garbage collection.

To be truly “object-oriented”, a computer system must provide automatic storage management.

(“Design Principles Behind Smalltalk”, Dan Ingalls, BYTE Volume 6 Number 8 p.289)

6. And definitely (this time, maybe) means message-sending.

This suggests a third principle for object-oriented design:

Messages: Computing should be viewed as an intrinsic capability of objects that can be uniformly invoked by sending messages.

[…]In most computer systems, the compiler figures out what kind of number it is and generates code to add 5 to it. This is not good enough for an object-oriented system because the exact kind of number cannot be determined by the compiler[…]

(op. cit., p.290)

7. This message-sending capability must be exposed to the UI.

An enabling condition for adequate flexibility of a user interface can be stated as an object-oriented principle:

Reactive Principle: Every component accessible to the user should be able to present itself in a meaningful way for observation and manipulation.

(op. cit., p.296)

[note: reactive programming woo]

So, you know what? Whatever you’re doing, it’s probably object-oriented. And whenever I say object-oriented, it may possibly mean whatever your meaning is.

About Graham

I make it faster and easier for you to create high-quality code.
This entry was posted in OOP. Bookmark the permalink.