Cascading ?

tim Rowledge tim at rowledge.org
Thu Aug 17 16:49:54 UTC 2006


Cascading allows a sequence of message sends to be 'stacked up' for  
sending to the same receiver. If you look at the EBNF spec (as shown  
in the Blue Book) for cascading you will see that it allows for
receiver
	message send;
	message send;
	....
A message send is a *single* message send to receiver and so the  
final 'size negated' in the original example given clearly doesn't  
count. I suspect there is a tendency to allow some C-think to creep  
in and treat the semi-colon as some sort of statement separator.
Note that you *can* do things like
|test|
test:=OrderedCollection with: 'first'.
test
   add: 'second', 'third';
   size
because the 'second','third' is not a message send to 'test' but a  
separate clause that gets evaluated earlier.

tim
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
Java:  the best argument for Smalltalk since C++





More information about the Squeak-dev mailing list