Stream interfaces

Neelakantan Krishnaswami neelk at alum.mit.edu
Wed Feb 28 20:43:58 EST 2001


On 28 Feb 2001 14:40:12 -0800, Don Dwiggins <dwig at advancedmp.net> wrote:
>Topmind writes:
>> 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
>
> A couple of reactions:
>
>  Could this kind of thing be achieved using multiple inheritance
>  with properly constructed mixins?  (For example, do the Common Lisp
>  or Eiffel folks use mixins to this effect?)

Dylan, a close relative of Scheme and CL, does exactly what you
suggest to implement its Streams heterarchy. I don't know enough about
CL to say, but the answer is probably yes there too.


Neel




More information about the Python-list mailing list