pipe
Bert Freudenberg
bert at freudenbergs.de
Sun Aug 26 20:42:39 UTC 2007
Just for fun - the tiny attached change-set allows #asPipe to get
piping behavior for cascades:
Squeak asPipe
ps: 'aux';
grep: 'fabio';
sort
It makes these two expressions equivalent
((((4 + 2) * 3) + 3) * 2)
4 asPipe + 2; * 3; + 3; * 2
Now I wouldn't use this in production but for interactive exploration
it might actually be useful. Similar to implementing Symbol>>#value:
to allow "(1 to: 10) collect: #squared".
Btw, did you know each class can declare its own parser and compiler
class? Experimenting with the syntax does not necessarily have to
break other's stuff.
- Bert -
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Pipe-bf.1.cs.gz
Type: application/x-gzip
Size: 521 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20070826/841bd15a/Pipe-bf.1.cs.bin
-------------- next part --------------
More information about the Squeak-dev
mailing list
|