[Ann] Nile 0.8.0 available

Bill Schwab BSchwab at anest.ufl.edu
Mon May 14 21:28:29 UTC 2007


Damien,

I had to read that a few times, but I think I follow.  *If* I do, then
the answer is that for your gettable stream, you would not consider
hitting the end to be an error.  An analog in Dolphin would be

   'hello' readStream nextWord

which evaluates to 'hello'.  The stream is left at its end, and a
subsequent #nextWord evauates to nil (which I find questionable).

Don't take my word for it.  Try asking #next: to read off the end of a
stream in Dolphin and VW - you will find the both environments complain
about it, and I submit they are correct to do so.  #nextAvailable: will
silently truncate if it hits the end of a stream, which is sometimes the
correct behavior.  IMHO, the problem at present is that Squeak assumes
all is well in situations that call for an error; the result is that
additional error checks are required, and history teaches us that they
will not always be included.

Bill


Damien Cassou wrote:
I thought about it however there is a problem. When you have a
gettable stream, you don't always know how much elements remain in the
stream. You are then obliged to read all elements before you know if
there was enough or not.

This is a problem because once read, the elements may not be available
anymore. So, if the method signal an error, all elements that have
been read are lost.




Wilhelm K. Schwab, Ph.D.
University of Florida
Department of Anesthesiology
PO Box 100254
Gainesville, FL 32610-0254

Email: bschwab at anest.ufl.edu
Tel: (352) 846-1285
FAX: (352) 392-7029




More information about the Squeak-dev mailing list