Radical Object-Orientation #03: The Principle of Mutual Oblivion (PoMO)
A paradigm needs principles, doesn't it. Here's the first one.
Radical Object-Orientation means stateful (autonomous) objects communicate unidirectionally (asynchronously) through messages. At least that's the gist of Alan Kay's original idea, which he introduced back in 1966 or 1967 using a biological analogy.
This concept never really made it into mainstream programming by the end of the 1980s with C++ and subsequent languages.
But there's more to it!
Because the abstracted "circuit diagram" with objects suggests something that doesn't exist.
When you see two objects connected by an arrow, you probably instinctively think that it represents a request-response relationship between the objects and, therefore, the object from which the arrow originates knows the other object where the arrow ends. But that's not the case!
In nature, there are no request-response relationships. No cell (like a nerve cell) sends a message to another (like a muscle cell) and waits for a reply.
In fact, no cell "knows" another. In the neuromuscular junction, the nerve cell has no knowledge of a muscle cell and vice versa.
Both cells only recognize the messenger Acetylcholine: the nerve cell knows when and how to produce it and releases it; the muscle cell can detect it and responds accordingly.
Cells just live and weave alongside each other, oblivious to the others. They have no demands on each. Triggered by a message, they simply do what's in their nature: they change their state and possibly produce messages to „push out“.
I consider this a truly important feature in Alan Kay's analogy. It's definitely to be adopted in object-oriented programming to do justice to his idea. I find it so crucial that I want to distill it into a principle:
Principle of Mutual Oblivion (PoMO)
PoMO states: "Thou shalt not let thy objects know each other.“ They ignore one another and only share messages. There is a "message contract", but no cooperation or even subordination contract.
In the illustration, this is expressed by the flow of Acetylcholine coming out of the nerve cell, but not going directly to the muscle cell. And Acetylcholine flows towards the muscle cell, but it doesn't come directly from the nerve cell. Both flows are initially independent of each other. Only an explicit coupling allows messages to flow from one cell to the other.
The continuous arrow in the first abstraction of the biological analogy was a simplification. To deeply understand Alan Kay's idea, you need to look closer. The fundamental independence of objects is key!
Isn't that radically different from mainstream object-orientation? It leads to an entirely different paradigm of "wiring" objects.
For a different take on the PoMo see this article: