3 ms·
> People say that OO is “meant” to be about message passing all the time, quoting Alan Kay and others. I never found this helpful. No mainstream OO language wor
by slver 5y ago
> People say that OO is “meant” to be about message passing all the time, quoting Alan Kay and others. I never found this helpful. No mainstream OO language works this way, even Smalltalk doesn’t.
It's how they work, however. The fact these messages tend to be synchronous in languages like Java which are mostly about intra-process communication is a matter of optimization.
But look at Erlang. That's probably the most pure OOP language we have, and hence why it scales so well the way Kay predicted OOP would.
Also all our "web APIs" are in effect OOP.
> Objects don’t “do” anything, they are simple passive data structures that are acted on by procedures.
Those procedures are an inseparable part of the objects, which is one of the first thing you learn about OOP...
> I meant here that you can't design real-world systems that way in OOP languages.
You need a relatively small step from OOP to actors. Sure some help from the language runtime would help to keep the model clean.
But let's say that mainstream OOP languages take SOME but not ALL principles of OOP and those are the principles they had use for in their context. This is how it should be. But we're slowly realizing the need to have real OOP in the mainstream now, which is about message passing.