More on WriteStream>>on:
Andreas Raab
andreas.raab at gmx.de
Wed Feb 14 21:57:32 UTC 2007
Alan Lovejoy wrote:
> <Andreas>
> Buffer streaming. It is very handy to be able to share the underlying
> collection with a stream when you know what you are doing.
> <Andreas>
>
> Yes. It would be even better to be able to do that wihout having to know so
> much about what some other object might or might not do.
I'm not advocating this as a general solution but I understood the
question to be about whether anyone has ever used that and whether
therefore such a change has the potential to break something severely.
And indeed, if you know what you are doing, this can be very handy and
very speedy.
Cheers,
- Andreas
> Damien is right. Either Streams should ensure their internal collections
> are unique to them, or they should assume that other objects have references
> to those collections, and might be expecting the stream to always be
> referencing the same collection. The second approach can be implemented
> using #become:.
>
> --Alan
>
>
>
>
More information about the Squeak-dev
mailing list
|