On the validity of comments

Ken Causey ken at kencausey.com
Fri Aug 8 18:25:43 UTC 2003


WriteStream class>>on:from:to

"Answer an instance of me on a copy of the argument, aCollection,  
determined by the indices firstIndex and lastIndex. Position the
instance at the beginning of the collection."

In reality the collection is neither copied nor is the position set to
the beginning of the collection.

a _ #(1 2 3 4 5).
(ReadWriteStream on: a from: 2 to: 4) reset nextPut: 5.
a

print-it on all that and you get back #(5 2 3 4 5).

Do users of such a WriteStream really expect their original collection
to be overwritten?

Ken
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20030808/1130acfd/attachment.pgp


More information about the Squeak-dev mailing list