Should ReadStream>>next signal EndOfStream?

Helge Horch Helge.Horch at munich.netsurf.de
Wed May 17 23:16:09 UTC 2000


Folks,

I'm currently porting some Dolphin source code (Dave Harris' lightweight 
BhrXmlParser[1], to be released RSN!), and I have found the attached system 
modification to be useful.  I don't know Dolphin at all, really, but this 
change seems to mirror its behaviour.  And thinking about it, it also seems 
to do the "right thing."

The XML parser relies on an Exception being signalled when the readLimit 
for a ReadStream is reached (primitive 65 in #next fails).  This could be a 
useful default behaviour for Squeak too, no?

I have implemented the change, and have yet to run into any 
problems.  OTOH, #next has 314 senders, and I haven't checked them 
all.  Does anyone *know* that s/he relies on nils at the stream's end?

I'd be grateful if someone would (carefully) have a look at this changeset, 
and comment on it.  If this for whatever reason is not a desirable, I'll 
have to dig deeper for making the port work.  ("Yay captain!  All unit 
tests green!" -- "Back to the pumps, sailor.")

Cheers,
Helge

[1] FWIW, yes, "lightweight" means nonvalidating, and 3.5 classes. :)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: EOS.3.cs
Type: application/octet-stream
Size: 1027 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20000518/c4723bf3/EOS.3.obj


More information about the Squeak-dev mailing list