More on WriteStream>>on:

Alan Lovejoy squeak-dev.sourcery at forum-mail.net
Thu Feb 15 02:03:40 UTC 2007



<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.

--Alan





More information about the Squeak-dev mailing list