OOP Message Passing

OOPS! I had it wrong!

I got it all wrong

I’ve heard about OOP almost 10 years ago when I started to get into programming. I thought I knew what it meant. I was taught it at university, I thought I at least knew the gist - the uncool, java-like, class-oriented, inheritance, polymorphism thing…

Last year, at the age of 21, I realised I didn’t know my history - and neither most of the people in the industry I learnt from. I started reading more Alan Kay - and realised the way the term is used now is very different to what Alan originally meant.

Not just OOP

One of the original authors of the Agile manifesto writes about terms that change their meaning through misuse, calling it “Semantic Diffusion”:

“Semantic diffusion occurs when you have a word that is coined by a person or group, often with a pretty good definition, but then gets spread through the wider community in a way that weakens that definition.” - Martin Fowler, 2006

One of my favourite tech comedy channels, Krazam, jokes that “Devops is a meaningful term” in his video about site-reliability engineers.

So what did Alan mean by OOP?

Firstly, he acklowedges he definitely doesn’t mean what OOP came to mean today.

“I’m sorry that I long ago coined the term”objects” for this topic because it gets many people to focus on the lesser idea.” - Alan Kay

He specifies the messages are the focal point:

“OOP to me means only messaging, local retention and protection and hiding of state-process, and extreme late-binding of all things.” - Alan Kay on the Meaning of OOP

Alan thought of these objects as little computers, little biological cells, that accept messages and do something with them. Other cells send these messages and do not care exactly what happens in the cell. All that matters is the messages it accepts and sends back, and that the behaviour is correct.

“The key in making great and growable systems is much more to design how its modules communicate rather than what their internal properties and behaviors should be.” - Alan Kay

This quote reminds me of the way I found Event-Driven architecture the most useful. Broadcast an event/message that describes what happened to other parts of the system. It does NOT care what they do with it.

'I like “messages” as “non-command” things.' - Alan Kay’s AMA

Alan also mentions late-binding and meta systems. I did not cover or explain it here because unlike focusing on the messages and hiding implementation details, I have trouble relating to it experientially. In other words, I only understand it conceptually.

Similiarities / Parallels