Re: [Pharo-users] [COTDC] 89 - NullStream
I'm a stream doing nothing (NullObject pattern). I can be handy when a stream is needed and that we need to do nothing (for example a logging in off mode). Stef On Dec 3, 2011, at 11:29 AM, sean@clipperadams.com wrote:
Continuing in Collections...
Today: NullStream
Comment Of The Day Contest - One Day One Comment Rules: #1: Each day a not commented class is elected. Each day the best comment will be integrated with name of the author(s). #2: If you cannot comment it, deprecate it. Results: http://code.google.com/p/pharo/wiki/CommentOfTheDayContest
p.s. this message was sent from a pharo image. Did you know you could easily do that?!
On 3 December 2011 23:27, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
I'm a stream doing nothing (NullObject pattern). I can be handy when a stream is needed and that we need to do nothing (for example a logging in off mode).
is it for write only or for read as well (always answering nil and always 'at end')?
Stef On Dec 3, 2011, at 11:29 AM, sean@clipperadams.com wrote:
Continuing in Collections...
Today: Â NullStream
Comment Of The Day Contest - One Day One Comment Rules: #1: Each day a not commented class is elected. Each day the best comment will be integrated with name of the author(s). #2: If you cannot comment it, deprecate it. Results: http://code.google.com/p/pharo/wiki/CommentOfTheDayContest
p.s. this message was sent from a pharo image. Did you know you could easily do that?!
-- Best regards, Igor Stasenko.
Igor Stasenko wrote
is it for write only or for read as well (always answering nil and always 'at end')?
For reading, it is a never-ending stream (#atEnd always answers false) of zeros (in binary mode) or null characters. Thanks Steph for the comment! -- View this message in context: http://forum.world.st/COTDC-89-NullStream-tp4153803p4157363.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
participants (3)
-
Igor Stasenko -
Sean P. DeNigris -
Stéphane Ducasse