(no title)
olavk | 7 years ago
But I also think the "message passing" metaphor has outlived its usefulness the same way. A caller does not need to know how the callee is implemented. Sure, but this is the same in any language with functions/procedure, this is not something specific for OO. The idea of message passing is a bit deeper, for example that the client does not even know it is calling a method. It sends a message, and the object answers, even if it is just by throwing an error that the message is not supported. This is how Smalltalk and (I think) Ruby works, but not at all how a statically types language like C# works. And it is not how Python works either. In Python you obtain a method reference from an object and then invoke it. So if you apply the message passing metaphor, your are actually passing the message to the method rather than the object itself. Which I think is just a confusing way to describe a method call.
No comments yet.