pipe

Ramon Leon ramon.leon at allresnet.com
Sat Aug 25 21:30:46 UTC 2007


> As observation..
> 
> This discussion is a good example of purists who throwing away 
> any new ideas just because they 'don't follow standard' or 
> 'can be done with current syntax'.
> 
> Honestly I see no harm in adding a pipe '|' symbol as a 
> special syntax symbol, like cascade ';' or period '.'
> A pipe is like continuation which simply does: evaluate 
> expression to the left, then continue evaluation with 
> expression to the right, taking left result as receiver.
> We need only minor changes to parser to add this syntax 
> sugar, and no changes in complier because it don't breaks old 
> syntax or message passing semantics.

It's a good idea, the pipe, but not necessarily a well thought through
implementation.  As Tim and Has point out, | is already used in several
places in the image and using it for special syntax for the pipe would cause
problems with existing code.  As Hans mentions, there's also the issue of
portability to other dialects.

Fabio's proposal to hijack ; for a pipe operator is obviously a non starter,
he clearly doesn't understand how much Smalltalk code relies on ;.

The way to get past the purists isn't by argument, it's by showing them an
implementation that works, and addresses their concerns.  A working
implementation is the difference between some who's serious about an idea
and someone who's just complaining.  It's easy to point at the old timers
and blame them for blocking progress, it's much harder to do something that
would actually be considered progress.

Squeak is the perfect experimental platform, so if someone hacked it up, and
it worked well, there's a fairly decent chance people will look seriously at
it.  Even if they don't, it could always be maintained as a private
extension to the language (I'm sure many exist).

Ramon Leon
http://onsmalltalk.com




More information about the Squeak-dev mailing list