[BUG] ReadStream>>isEmpty ?

Ken Causey ken at kencausey.com
Fri Aug 8 16:44:35 UTC 2003


On Fri, 2003-08-08 at 11:18, Brent Vukmer wrote:
> > Note that when you create the stream it is positioned at the end 
> 
> Why is that the case? 

Well there is the potential here for an interesting debate.

As it stands what is happening (conceptually) is that the stream is
created empty and that the values are written to it and then the stream
is returned. Similar to what you would expect with a file: Create a new
file; open it for both reading and writing; write out some data to it;
you are positioned at the end and must seek back to the beginning if you
want to read from the beginning.

However conceptually (I think) a ReadStream is not writeable.  One could
argue that when you create one with values it should be considered as if
it preexisted the "opening" and therefore be positioned at the beginning
when it is returned.

Which is right?  *shrug*

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/35855cf7/attachment.pgp


More information about the Squeak-dev mailing list