BlockStream refactored

Brian T Rice water at tunes.org
Thu Oct 30 14:44:28 PST 2003


I've started merging in some long-separate changes into CVS today...

In src/stream.slate ...

BlockStream has now been placed in its appropriate place, as "Method
ReadStream", so you can take a block [] and call "reader" or ">>" on it.

Correspondingly, I've added "Method WriteStream" which is similar but has
a notable difference in that the block has to take one method. I
considered supporting arbitrary arity blocks, but that seemed too
cumbersome. Anyway, anything placed on the WriteStream via nextPut: etc.
will be an argument to the block executed in the order presented. I've not
found a great use for it, but it seemed like an appropriate feature to
round out the protocol. :)

Actually it's really useful for scripts or something, but it's basically
just do: all over again; the fact that it can be plugged in to an
EchoStream target is probably the prime benefit.

-- 
Brian T. Rice
LOGOS Research and Development
http://tunes.org/~water/



More information about the Slate mailing list