More on WriteStream>>on:
Klaus D. Witzel
klaus.witzel at cobss.com
Thu Feb 15 06:49:21 UTC 2007
Hi Alan,
on Thu, 15 Feb 2007 03:03:40 +0100, you wrote:
>
> <Klaus D. Witzel>
> Like for
> Smalltalk specialObjectsArray writeStream nextPutAll: {this. and. that}
>> The second approach can be implemented using #become:.
> Not always. See example above. effect
> </Klaus D. Witzel>
>
> Your example is problematic no matter how WriteStreams work. If the
> stream
> makes its own copy of the Array, the code won't have the expected
> effect. On
> the other hand, if it uses #become: on that particular Array...
>
> I think your example demonstrates an issue with <Smalltalk
> specialObjectsArray>, and not an issue with WriteStreams at all.
I don't think so. This is just an example of why to not assume anything
about the arguments passed, especially not that arguments can be
#become:'d without pain, headaches and the like.
FWIW my main point it to not compromize general use of WriteStreams, and
not that I don't like it to be changed.
/Klaus
> --Alan
>
>
>
>
More information about the Squeak-dev
mailing list
|