Stream interfaces
jarober at cc36623-b.hwrd1.md.home.com
jarober at cc36623-b.hwrd1.md.home.com
Tue Feb 27 17:03:04 EST 2001
In article <MPG.1505ab2efd31b1639896b4 at news.earthlink.net>,
Topmind <topmind at technologist.com> wrote:
>
>
<snip>
>I admit that I am not an expert on streams, but this
>hierarchy seams tree-happy to me.
>
stream := (String new: 1000) readStream.
stream := 'myFile' asFileName writeStream.
Same idea, but simpler...
>Why not have something like this instead:
>
>s = newStream(....)
>s.peekable = true
>s.positionable = false
>s.external = blah
>s.buffered = blah
>s.readAble = true
>s.writeAble = true
>[use the stream now.....]
>
>(Note that the dot syntax could be a
>dictionary instead of an object, BTW.
>Also note that these would have *defaults*
>so that not every setting needs to be
>explicitly set.)
>
>This setup is much easier to manage and grok IMO. It also allows *more*
>potential combinations, like buffered internal streams. (I can't think of
>why anybody would want such, but why limit the future to one's
>current lack of imagination. Perhaps they want to test buffering
>locally.)
>
>I want to flatten GUI's and Collections in a similar way.
>
>Flatten flatten flatten!
>
>-flatmind-
>
>(But I am not flat-footed. I have a very prominent arch.)
>
>
--
James A. Robertson
Product Manager (Smalltalk), Cincom
jarober at mail.com
<Talk Small and Carry a Big Class Library>
More information about the Python-list
mailing list