| > Isn't a method call a message, and the return value a message back? It is! In my view, the point that Alan Kay and Joe Armstrong are trying to make is that languages like C++/Java/C# etc have very limited message passing abilities. Alan Kay uses the term "late binding". In Kay's opinion, "extreme late binding" is one of the most important aspects of his OOP [1], even more important than polymorphism. Extreme late binding basically means letting the object decide what it's gonna do with a message. This is what languages like Objective-C and Ruby do: deciding what to do after a method is dispatched always happen during runtime. You can send a message that does not exist and have the class answer to it (method_missing in Ruby); you can send a message to an invalid object and it will respond with nil (Objective-C, IIRC); you can delegate everything but some messages to a third object; you can even send a message to a class running in other computer (CORBA, DCOM). In C++, for example, the only kind of late binding that you have is abstract classes and vtables. - > Or is it that "true OO" must be asynchronous? It doesn't have to be asynchronous, but in Alan Kay's world, the asynchronous part of messaging part should be handled by that "dispatcher", rather than putting extra code in the sender or the receiver. I don't remember Alan Kay elaborating on it, but he discusses a bit about this "interstitial" part of OOP systems in [2] - [1] - https://en.wikipedia.org/wiki/Late_binding [2] - http://wiki.c2.com/?AlanKayOnMessaging |
> In C++, for example, the only kind of late binding that you have is abstract classes and vtables.
That's not true, you can always have a "send_message(string id)". Few people do it because you lose static type safety. And some languages, like C# and Scala, have dynamic types that allows for the "method_missing" protocol and such features are very unpopular.
To be honest I don't see much of a difference. I've worked with a lot of dynamic OOP languages, including with Erlang-style actors and I've never seen the enlightenment of dynamic OOP message passing.
And I actually like OOP, but I don't really see the point of all this hyperbole about Smalltalk.