[Python-ideas] Message passing syntax for objects

Masklinn masklinn at masklinn.net
Mon Mar 18 08:47:51 CET 2013

On 2013-03-18, at 06:34 , Greg Ewing wrote:

> Ian Cordasco wrote:
>> On Sun, Mar 17, 2013 at 11:53 PM, Mark Janssen
>> <dreamingforward at gmail.com> wrote:
>>> Hello,
>>> I just posted an answers on quora.com about OOP (http://qr.ae/TM1Vb)
>>> and wanted to engage the python community on the subject.
> My answer to that question would be that it *did*
> catch on, it's just that we changed the terminology.
> Instead of message passing, we talk about calling
> methods.

Ruby uses a smalltalk-ish terminology: message is what is sent to an
other object, method is a hook used by an object to respond to a
message. Hence `Object#send`[0] and the lack of externally-accessible
attributes (unless explicitly exposed via a message). I believe
objective-c is much the same, for similar reasons (and thus the
low-level routine for message dispatching is objc_msgSend()[1])

[0] http://ruby-doc.org/core-2.0/Object.html#method-i-send
[1] https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/ObjCRuntimeRef/Reference/reference.html#//apple_ref/c/func/objc_msgSend

More information about the Python-ideas mailing list