topmind at technologist.com
Wed Feb 28 03:03:49 CET 2001
> In article <MPG.1505ab2efd31b1639896b4 at news.earthlink.net>,
> Topmind <topmind at technologist.com> wrote:
> >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...
Simpler than what?
What I showed was illustrative of the concept, not the
utmost fewest syntax. Names can be given to common
combinations, for example. (This could be in the
form of functions, or a built-in configuration names.)
You are not selling hierarchies, but shortcut names.
My approach has WAY more possible combos than a tree.
Make a little grid and see for yourself.
> >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
> >I want to flatten GUI's and Collections in a similar way.
> >Flatten flatten flatten!
> >(But I am not flat-footed. I have a very prominent arch.)
More information about the Python-list