[Python-ideas] Message passing syntax for objects

Steven D'Aprano steve at pearwood.info
Mon Mar 18 07:46:32 CET 2013

On 18/03/13 14:53, Mark Janssen 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.
> Alan Kay's idea of message-passing in Smalltalk are interesting, and
> like the questioner says, never took off.  My answer was that Alan
> Kay's abstraction of "Everything is an object" fails because you can't
> have message-passing, an I/O task, working in the same space as your
> objects -- they are two very different functionalities and they have
> to be preserved **for the programmer**.
> This functional separation made me think that Python could benefit
> from a syntactical, language-given separation between Classes and the
> messages between them, to encourage loosely-coupled, modular OOP.
> Something that OOP has always promised but never delivered.

I am very interested in this as a concept, although I must admit I'm not entirely sure what you mean by it. I've read your comment on the link above, and subsequent emails in this thread, and I'm afraid I don't understand what you mean here. I feel you are assuming that your readers are already experts on message-passing languages (Smalltalk?). I know what *I* mean by message passing, but that's not necessarily what you mean by it.

For example, you state in another email:

By building it into the language, it would *enforce* a modular object
style, rather than the current, very specialized and very programmer
specific way there is now.  In fact, most people never really think in
that paradigm, yet if the language supported/proposed such a syntax,
programmers would start to re-arrange the whole object hierarchy in a
new, more modular and universal way.
[end quote]

I don't understand this. In what way would message passing enforce a modular object style? In what way does Python not already have a modular object style?


More information about the Python-ideas mailing list