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: 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=1Pd7Xu61urXtuLcXom2zAxZrgVZFzGqPYfNm/nDHqjBWhgNHDPWw7zRzPVb/oY1Goy1cu7cpyqB21GdwLOLuBUygB8Jf+wo8ObbOAHAj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<5146B848.3040509@pearwood.info> <1363643500.25746.YahooMailNeo@web184701.mail.ne1.yahoo.com> Date: Mon, 18 Mar 2013 20:31:31 -0700 (PDT) From: Andrew Barnert Subject: Re: [Python-ideas] Message passing syntax for objects To: Mark Janssen In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: Python List , Python-Ideas X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Andrew Barnert List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: 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 From: Mark Janssen =0A=0ASent: Monday, March 18,= 2013 4:41 PM=0A=0A=0A> On Mon, Mar 18, 2013 at 2:51 PM, Andrew Barnert =0A> wrote:=0A>> Have you even looked at a message-passi= ng language?=0A>> =0A>> A Smalltalk "message" is a selector and a sequence= of arguments. =0A> That's what you send around. Newer dynamic-typed messag= e-passing OO and =0A> actor languages are basically the same as Smalltalk.= =0A> =0A> Yes, but you have to understand that Alan Kays came with strange = ideas=0A> of some future computer-human symbiosis.=C2=A0 So his language de= sign and=0A> other similar attempts (like php) is rather skewed from that p= remise=0A=0AThe idea that message passing is fundamentally different from m= ethod calling also turned out to be one of those strange ideas, since it on= ly took a couple years to prove that they are theoretically completely isom= orphic=E2=80=94and, for that matter, they're both isomorphic to closures.= =0A=0A> And also, despite name-dropping, I'm not trying to create anything= =0A> like that idea of message-passing.=C2=A0 I'm talking about something v= ery=0A> simple, a basic and universal way for objects to communicate.=0A=0A= Message passing is a simple, basic, and universal way for objects to commun= icate. Everything from dot-syntax method calls to JSON RPC protocols can be= modeled as passing messages.=C2=A0But what you're talking about isn't mess= age passing. The idea that messages have names, and reference objects as ar= guments, is fundamental, and by leaving that out, you're talking about some= thing different.=C2=A0=0A=0AIn effect, your "objects" are just single-param= eter functions, and your "messages" are the call operator.=0A=0A>>> With f= unction or method syntax, you're telling the computer to=0A>>> "execute so= mething", but that is not the right concepts for =0A> OOP.=C2=A0 You=0A>>> = want the objects to interact with each other and in a high-level=0A>>> la= nguage, the syntax should assist with that.=0A>>=C2=A0=0A=0A>> And you hav= e to tell the object _how_ to interact with each other.=0A> =0A> This is a = different paradigm that what I'm talking about.=C2=A0 In the OOP=0A> of my = world, Objects already embody the intelligence of how they are=0A> going to= interact with the outside world, because I put them there.=0A=0AThe paradi= gm 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.=0A=0A>> = Even with reasonably intelligent animals, you don't just tell two =0A> anim= als to interact, except in the rare case where you don't care whether =0A> = they become friends or dinner.=0A> =0A> You're model of computer programmin= g is very alien to me.=C2=A0 So I don't=0A> think it will be productive to = try to convince you of what I'm=0A> suggesting, but feel free to continue..= .=0A=0A=0AMy model of (object-oriented) computer programming is that progra= mming objects model objects which=C2=A0have a variety of behaviors, each of= which is triggered by sending a different message.=C2=A0This is pretty muc= h the central definition that everyone who programs or theorizes about prog= ramming uses. If you read any textbook, wiki page, journal article, or tuto= rial, they're all talking about that, or something directly isomorphic to i= t. If that's alien to you, then object-oriented programming is alien to you= .