Friday, November 19, 2010

Alan Kay on Object-Oriented Programming

Some interesting statements of Alan Kay (one of the Smalltalk creators) about object-oriented programming:
"My original thought was to have something like recursive biological cells. We have about 10 to the 14th power of cells in our body. That is a hell of a lot more cells than there are nodes on the Internet. Those cells spend almost all of their effort keeping themselves normal. They're self-repairing, and you don't have to stop the organism in order to affect repairs. And then there are some interesting mathematical properties of this kind of thing that also occurred to me, and I called those things objects." [1]
"So I thought of objects being like biological cells, only able to communicate with messages (so messaging came at the very beginning - it took a while to see how to do messaging in a programming language efficiently enough to be useful)." [2]
"Object-oriented programming to me means only messaging, encapsulating and hiding state, and extreme late-binding of all things. It could be done in Smalltalk and in LISP. There are possibly other systems in which this is possible, but I'm not aware of them." [3]
"The big idea is "messaging" - that is what the kernel of Smalltalk/Squeak is all about (and it's something that was never quite completed in our Xerox PARC phase). 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." [4]
"Until real software engineering is developed, the next best practice is to develop with a dynamic system that has extreme late binding in all aspects." [5]

I think, Erlang and the QNX Neutrino RTOS definitely belong to those kind of systems. The fact that the above statement also defines QNX Neutrino RTOS as an object-oriented platform shows that particular technologies often do not matter as much as the right architectures and paradigms.
Also Apple's Objective-C platform and Google's Android OS are heavily based on message passing. That's why all this stuff works so great :-)

PS: some thoughts on message passing from the Erlang, Scala and F# creators.


  1. Most software today is very much like an Egyptian pyramid with millions of bricks piled on top of each other, with no structural integrity, but just done by brute force and thousands of slaves. (

  2. Messaging is late binding for threads ;-)

  3. I've always thought that messaging is the best means of composing complex software systems, especially in todays multicore world. For this reason, I quite like the idea behind visual languages like Max and Pd as they represent code as "objects" or computation nodes which pass messages between each other (a dataflow network). I don't think Max and Pd really go far enough and I certainly feel their type systems are severely lacking (eg, in Max you cannot nest lists), but as a paradigm they get a lot of the message passing semantics right.

    You may also find this article interesting: