[Ann] Nile 0.8.0 available

subbukk subbukk at gmail.com
Mon May 14 15:43:44 UTC 2007


On Monday 14 May 2007 6:38 pm, 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.
The string example is not a good illustration for a Stream since its length is 
already  known. A Stream represents a open-ended sequence. When there are no 
more elements to be read, we cannot be sure that the stream has ended. 
Perhaps, more elements may come in at a later time (e.g. reading from stdin 
on Unix). The atEnd test is required to distinguish between the two cases. 

For closed sequences, a separate class, Buffer, could be introduced. It would 
be like an Array except that it would have a cursor and would be accessed 
sequentially. Since the sequence is closed, its size is known. Remaining 
elements would be (size - position).

Nile is very nicely done. I hope it replaces the current File/Directory 
classes which are too closely tied to the underlying platform.

One area where it could improve is in handling pathnames. Pathnames should be 
distinct class instead of aString. We could represent Path by a sequence of 
aString, then we could abstract out pathname separator characters. This 
deserves a separate discussion thread.

Regards .. Subbu



More information about the Squeak-dev mailing list