More on WriteStream>>on:

Klaus D. Witzel klaus.witzel at cobss.com
Wed Feb 14 18:14:20 UTC 2007


Hi Roel,

on Wed, 14 Feb 2007 18:47:05 +0100, you wrote:

> Could somebody who likes the fact that WriteStream modifies the  
> collection passed with #on: give me an actual example where this  
> behaviour is actually desirable/useful (I am not talking about  
> ReadStream here) ?
>
>
> Otherwise put, why should we not change the implementation of #on: in  
> Stream to do:
>
> on: aCollection

I would be strongly against such a copy; also a condition like  
(aCollection isString) would be way too much. The literal (which people  
seem to believe is a constant, it is *not*, it's a *literal* object) can  
only be decided by the *caller* to be constant. Besides of that:  
performance ...

Isn't #writeStream a very meaningful English wording? "caution, we are the  
*writers*, we *write* when you ask for #writeStream".

/Klaus

> 	.... aCollection copy .....
>
>
> --
> Roel
>
>





More information about the Squeak-dev mailing list