[squeak-dev] Re: Generators on Streams on Generators on Collections on ...

Eliot Miranda eliot.miranda at gmail.com
Wed Apr 13 13:35:07 UTC 2016



> On Apr 12, 2016, at 12:33 PM, marcel.taeumel <Marcel.Taeumel at hpi.de> wrote:
> 
> Hi Nicolas,
> 
> if you construct something like:
> 
> | someStream |
> someStream := mySocketStream select: [:ea | ... ] thenCollect: [:ea | ... ].
> ...
> someStream next.
> ...
> someStream next: 5.
> ...
> 
> You can only use someStream as long as there is data available while it is
> connected. Now, it can happen that socket streams are temporarily "at end"
> while no data is waiting in the buffer. Then, you would have to reconstruct
> someStream to continue. And know about it.

That's changing the definition of "at end".  A socket stream is at end when it is closed.  In thus circumstance a few stream implementations use basicAtEnd to answer if at the end of the current buffer's worth.  But atEnd meaning "at the end of what's available so far" doesn't make sense, at least to me.

> 
> Best,
> Marcel
> 
> 
> 
> --
> View this message in context: http://forum.world.st/Generators-on-Streams-on-Generators-on-Collections-on-tp4889389p4889623.html
> Sent from the Squeak - Dev mailing list archive at Nabble.com.
> 


More information about the Squeak-dev mailing list