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


Groups > comp.lang.python > #41458 > unrolled thread

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

Started byBenjamin Kaplan <benjamin.kaplan@case.edu>
First post2013-03-18 13:34 -0700
Last post2013-03-18 13:34 -0700
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [Python-ideas] Message passing syntax for objects Benjamin Kaplan <benjamin.kaplan@case.edu> - 2013-03-18 13:34 -0700

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

FromBenjamin Kaplan <benjamin.kaplan@case.edu>
Date2013-03-18 13:34 -0700
SubjectRe: [Python-ideas] Message passing syntax for objects
Message-ID<mailman.3475.1363638846.2939.python-list@python.org>
On Mon, Mar 18, 2013 at 1:24 PM, Mark Janssen <dreamingforward@gmail.com> wrote:
> On Mon, Mar 18, 2013 at 12:06 PM, Georg Brandl <g.brandl@gmx.net> wrote:
>> Am 18.03.2013 05:26, schrieb Mark Janssen:
>>> Continuing on this thread, there would be a new bunch of behaviors to
>>> be defined.  Since "everything is an object", there can now be a
>>> standard way to define the *next* common abstraction of "every object
>>> interacts with other objects".
>>
>> The problem is that for most objects there isn't *the* interaction.  Sure,
>> you could split up complicated objects into small pieces with a smaller
>> functionality, but at some point you have to stop.
>
> Yes.  But that is the point, if you look at the quora post -- to
> invert the object model and create mashups of simple modular data
> types and working *upwards*.
>
>>  Let's see how this
>> concept fares with simple types such as integers or collections...
>>
>>>>>> 42 >> MyNumberType #would add the integer to your integer type
>>
>> That's just random.  Why not multiply?  Why not exponentiate?
>
> Well, as I noted in another post, that while these can be broken down
> into their simpler component (addition and negative numbers), numbers
> should probably be treated separately.
>
>>>>>> 42 >> MyCollectionType  #would add the object into your collection:
>>>  *poof*: no more random syntaxiis for putting things in collections.\
>>
>> So you've replaced one method of a collections API by your magical operator,
>> for all collections.
>
> Yes -- for all collections.  That's a pretty big gain right?
>

Nope. No gain at all. Instead of learning the add() method, you learn
the >> operator. You have not simplified anything.
>> It seems that you are reinventing pipes (such as UNIX shell pipes).
>
> That is a very interesting comparison.  That is something like what
> I'm trying to do.  In tandem with the Internet, I do see a kind of
> synthesis of Web + O.S. integration -- ultimately, creating a "data
> ecosystem".
>
> mark

Yes, having the whole program run by chaining functions together is a
neat idea. And it works great in functional languages- if you want
that as a feature, use OCaml or Haskell. It works less well in
imperative languages where you are manipulating data, not just passing
it around.

> --
> http://mail.python.org/mailman/listinfo/python-list

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web