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


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

Re: Message passing syntax for objects

Started byMark Janssen <dreamingforward@gmail.com>
First post2013-03-17 21:26 -0700
Last post2013-03-17 21:26 -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: Message passing syntax for objects Mark Janssen <dreamingforward@gmail.com> - 2013-03-17 21:26 -0700

#41394 — Re: Message passing syntax for objects

FromMark Janssen <dreamingforward@gmail.com>
Date2013-03-17 21:26 -0700
SubjectRe: Message passing syntax for objects
Message-ID<mailman.3409.1363580809.2939.python-list@python.org>
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".  And going with my suggestion of
defining >> and << operators, I'm going to explore the concept
further....

>>> 42 >> MyNumberType #would add the integer to your integer type
>>> 42 >> MyCollectionType  #would add the object into your collection:  *poof*: no more random syntaxiis for putting things in collections.\
>>> MyObject >>     # queries the object to output its state.
>>> "http://www.cnn.com" >> MyInternetObject  #outputs the HTML text from CNN's home page.

Each object has to figure out how it will receive things from outside
of it.  Things it can't handle (a string sent to an int) just have to
be dropped to some other space, much like stderr does within the O.S.

There are probably many other very interesting examples, but the key
idea I'm working on (as noted in other messages), is a sort-of
universal language for the internet, a WebOS to be applied to a
universal data model.

Mark

[toc] | [standalone]


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


csiph-web