Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #41477

Re: [Python-ideas] Message passing syntax for objects

Path csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <abarnert@yahoo.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.002
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'subject:: [': 0.03; 'syntax': 0.03; 'wiki': 0.03; 'subject:Python': 0.05; 'json': 0.07; 'alan': 0.09; 'arguments,': 0.09; 'high-level': 0.09; 'cc:addr:python-list': 0.10; 'looked': 0.10; 'language,': 0.11; 'language': 0.14; '(like': 0.15; 'passing': 0.15; 'basic,': 0.16; 'cc:name:python list': 0.16; 'effect,': 0.16; 'janssen': 0.16; 'language?': 0.16; 'operator.': 0.16; 'php)': 0.16; 'reasonably': 0.16; 'skewed': 0.16; 'subject:ideas': 0.16; 'syntax,': 0.16; 'useless.': 0.16; 'you..': 0.16; 'mon,': 0.16; 'wrote:': 0.17; 'basically': 0.17; '>>>': 0.18; 'subject:] ': 0.19; 'trying': 0.21; 'universal': 0.22; 'uses.': 0.22; 'programming': 0.23; 'monday,': 0.23; 'idea': 0.24; 'cc:2**1': 0.24; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; 'andrew': 0.27; 'newer': 0.27; 'there.': 0.28; 'arguments.': 0.29; 'convince': 0.29; 'oop': 0.29; 'protocols': 0.29; 'definition': 0.29; 'objects': 0.29; "i'm": 0.29; 'that.': 0.30; 'basic': 0.30; 'function': 0.30; 'lists': 0.31; 'everyone': 0.33; 'languages': 0.33; 'that,': 0.34; 'reply-to:addr:yahoo.com': 0.34; 'sequence': 0.35; 'pm,': 0.35; 'similar': 0.35; 'something': 0.35; 'except': 0.36; 'but': 0.36; 'method': 0.36; 'useful': 0.36; 'anything': 0.36; 'should': 0.36; 'two': 0.37; 'sent:': 0.37; 'rather': 0.37; 'mark': 0.38; 'from:': 0.38; 'object': 0.38; 'some': 0.38; 'where': 0.40; 'subject:-': 0.40; 'think': 0.40; 'your': 0.60; 'telling': 0.61; 'free': 0.61; 'leaving': 0.62; 'strange': 0.62; 'different': 0.63; 'world': 0.63; 'skip:n 10': 0.63; 'more': 0.63; 'other.': 0.64; 'become': 0.65; 'talking': 0.66; 'header:Reply- To:1': 0.68; 'intelligent': 0.71; 'friends': 0.83; '2013': 0.84; 'article,': 0.84; 'communicate.': 0.84; 'premise': 0.84; 'received:access.bullet.mail.sp2.yahoo.com': 0.84; 'alien': 0.91; 'journal': 0.91; 'received:98.139.44': 0.91; '8bit%:18': 0.95
X-Yahoo-Newman-Property ymail-3
X-Yahoo-Newman-Id 911779.58795.bm@omp1008.access.mail.sp2.yahoo.com
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1363663891; bh=LeEiMlUq+CpVXZBB8UwliZLE591Yx49IqqTvthxQQ58=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=UnAzwD+JfxB+nhj4WD5+VA/ZdwEx/i8x9pLVEElZEOg2A36pq+NeLZFyP49gPkcA6HAsv00qTHHrrmwqijhm3CF5VGdisyqP9g8XtXctrAx3JBB1UrC51fcEQvDPii1PeGPlCL1fAFFDm82h8+QwKvN5vgNZrUlhoC/NztIEaLE=
DomainKey-Signature a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=1Pd7Xu61ur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zYWdlIiBpcyBhIHNlbGVjdG9yIGFuZCBhIHNlcXVlbmNlIG9mIGFyZ3UBMAEBAQE-
X-Mailer YahooMailWebService/0.8.138.524
References <CAMjeLr_dBCSL9VGjrW6wJjMDhLWFdxWqGWw+5MXTfo8+x9yfYw@mail.gmail.com> <5146B848.3040509@pearwood.info> <CAMjeLr9bH9nYpEeq8KjzHXmEXpuUgAjvWb3f2e7VR2sno=6Rkw@mail.gmail.com> <CAMjeLr9f1wmFTYh7ShQrzc-fo+Xa5DPG-LDULn2VnUbrBjEo-Q@mail.gmail.com> <1363643500.25746.YahooMailNeo@web184701.mail.ne1.yahoo.com> <CAMjeLr-m5uOW95zSHMO-18i81dH4Es0OCpte-HEO_rCmV=dpWA@mail.gmail.com>
Date Mon, 18 Mar 2013 20:31:31 -0700 (PDT)
From Andrew Barnert <abarnert@yahoo.com>
Subject Re: [Python-ideas] Message passing syntax for objects
To Mark Janssen <dreamingforward@gmail.com>
In-Reply-To <CAMjeLr-m5uOW95zSHMO-18i81dH4Es0OCpte-HEO_rCmV=dpWA@mail.gmail.com>
MIME-Version 1.0
Content-Type text/plain; charset=utf-8
Content-Transfer-Encoding quoted-printable
Cc Python List <python-list@python.org>, Python-Ideas <python-ideas@python.org>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
Reply-To Andrew Barnert <abarnert@yahoo.com>
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.3486.1363663902.2939.python-list@python.org> (permalink)
Lines 47
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1363663902 news.xs4all.nl 6924 [2001:888:2000:d::a6]:39686
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:41477

Show key headers only | View raw


From: Mark Janssen <dreamingforward@gmail.com>

Sent: Monday, March 18, 2013 4:41 PM


> On Mon, Mar 18, 2013 at 2:51 PM, Andrew Barnert <abarnert@yahoo.com> 
> wrote:
>>  Have you even looked at a message-passing language?
>> 
>>  A Smalltalk "message" is a selector and a sequence of arguments. 
> That's what you send around. Newer dynamic-typed message-passing OO and 
> actor languages are basically the same as Smalltalk.
> 
> Yes, but you have to understand that Alan Kays came with strange ideas
> of some future computer-human symbiosis.  So his language design and
> other similar attempts (like php) is rather skewed from that premise

The idea that message passing is fundamentally different from method calling also turned out to be one of those strange ideas, since it only took a couple years to prove that they are theoretically completely isomorphic—and, for that matter, they're both isomorphic to closures.

> And also, despite name-dropping, I'm not trying to create anything
> like that idea of message-passing.  I'm talking about something very
> simple, a basic and universal way for objects to communicate.

Message passing is a simple, basic, and universal way for objects to communicate. Everything from dot-syntax method calls to JSON RPC protocols can be modeled as passing messages. But what you're talking about isn't message passing. The idea that messages have names, and reference objects as arguments, is fundamental, and by leaving that out, you're talking about something different. 

In effect, your "objects" are just single-parameter functions, and your "messages" are the call operator.

>>>  With function or method syntax, you're telling the computer to
>>>  "execute something", but that is not the right concepts for 
> OOP.  You
>>>  want the objects to interact with each other and in a high-level
>>>  language, the syntax should assist with that.
>> 

>>  And you have to tell the object _how_ to interact with each other.
> 
> This is a different paradigm that what I'm talking about.  In the OOP
> of my world, Objects already embody the intelligence of how they are
> going to interact with the outside world, because I put them there.

The paradigm you're talking about is useless. You have lists that know how to append, but don't know how to get/search/iterate. Almost every useful object needs the intelligence to interact with the world in two or more ways.

>>  Even with reasonably intelligent animals, you don't just tell two 
> animals to interact, except in the rare case where you don't care whether 
> they become friends or dinner.
> 
> You're model of computer programming is very alien to me.  So I don't
> think it will be productive to try to convince you of what I'm
> suggesting, but feel free to continue...


My model of (object-oriented) computer programming is that programming objects model objects which have a variety of behaviors, each of which is triggered by sending a different message. This is pretty much the central definition that everyone who programs or theorizes about programming uses. If you read any textbook, wiki page, journal article, or tutorial, they're all talking about that, or something directly isomorphic to it. If that's alien to you, then object-oriented programming is alien to you.

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: [Python-ideas] Message passing syntax for objects Andrew Barnert <abarnert@yahoo.com> - 2013-03-18 20:31 -0700

csiph-web