3 ms·
"Messaging" also means loose coupled. It enables things like Structural interfaces (you implement what you implement) like in Go, instead of declarative interfa
by DanielRibeiro 16y ago
"Messaging" also means loose coupled. It enables things like Structural interfaces (you implement what you implement) like in Go, instead of declarative interfaces (you implement what you say you implement) like in Java/C++/C#.
"Messaging" and its loose coupling also means the ability of doing Method Lookup Alteration and Interception [1], such as those provided by Smalltalk’s doesNotUnderstand, Ruby’s missing_method and Python’s __gettattr__ method. This is crucial because it allows you to compose objects, as they are strippable down to the Common Lisp Object System system: an object is a function that takes a message specification (method name and args) and decides what to do with it.
Yeah. Messaging is really important and powerful. It also explains why Alan Kay also said: I coined the term object-oriented, and C++ wasn't what I had in mind.
[1]http://www.google.com/url?sa=t&source=web&cd=2&ved=0CBsQFjAB&url=http%3A%2F%2Fciteseerx.ist.psu.edu%2Fviewdoc%2Fdownload%3Fdoi%3D10.1.1.91.1021%26rep%3Drep1%26type%3Dpdf&rct=j&q=method+lookup+alteration+and+interception&ei=ZSEsTMTYC4KJuAfw2p3CCQ&usg=AFQjCNH7dktUqD_4vSjR5aHidE9U4Y3sIg&sig2=bHOpRznFWe0WqxTJxx9D9w http://www.google.com/url?sa=t&source=web&cd=2&v...
- bad_user 16y ago"Messaging" is polymorphism in action and a way to describe it to people without headaches by concentrating on benefits and use-cases, instead of implementation details. And to be a little pedantic -- virtual method calls in Java/C#/C++ are also messages. What Alan Kay meant was that a static type system doesn't blend with the OOP he enabled in Smalltalk. Do you know why? Because in OOP polymorphism, method-dispatching is late-bound. And being late-bound it makes absolute sense for the developer to be able to override the method-dispatching that's being done (by means of method_missing and other mechanisms). But that's directly at odds with the purpose of a static type system. And btw, structural typing is not dynamic typing. It has the same problem as the one described above.