pipe

Matthew Fulmer tapplek at gmail.com
Sat Aug 25 02:51:44 UTC 2007


On Sat, Aug 25, 2007 at 05:39:17AM +0300, Igor Stasenko wrote:
> > > I need the `|` to avoid parenthesis, and weird hacks ...
> >
> > Like what?
> >
> > What do you mean by pipes? Are you refering to some kind of
> > streaming like in bash where output can be generated from one
> > process and input to another with finite memory? If so, I am not
> > sure that is possible in general; objects are not always
> > serializable.
> >
> > What kind of use case do you have in mind?
> >
> let me elaborate:
> 
> a message1 | message2
> 
> is equal to:
> 
> a message1 message2
> 
> and:
> 
> a message1: param | message2: param2
> 
> is equeal to:
> 
> (a message1: param) message2: param2
> 
> 
> and as you can see writing code with so-called 'pipes' makes code much cleaner

Those two examples are exactly the same length in characters, so
I don't see what metric qualifies one as much cleaner than the
other.

Parenthesis are not very common in squeak, and this would be
less common as parenthesis. Parentheses are more general
too; you could not do this with pipes:

dict at: (self keyFor: anItem) put: 3

I am really missing what the point of this is

-- 
Matthew Fulmer -- http://mtfulmer.wordpress.com/
Help improve Squeak Documentation: http://wiki.squeak.org/squeak/808



More information about the Squeak-dev mailing list