[Python-Dev] Single- vs. Multi-pass iterability
Guido van Rossum
guido@python.org
Thu, 18 Jul 2002 15:30:41 -0400
> I suspect read and write would best be kept on separate
> interfaces. Ability to read, write, seek-and-tell, being three
> atoms of which it makes sense to have about 6 combos
> (R, W, R+W, each with or without S&T). Rewind might
> make sense separately from S&T if streaming tapes were still in
> fashion and OS's gave natural access to them.
5, because R+W without S&T makes little sense.
> But I do think it's all pretty academic.
C++ has tried very hard to do this with its istream, ostream and
iostream classes; I believe I heard C++ people say once that it's not
considered a success. I believe Java has tried to address this too.
What do you think of Java's solution?
--Guido van Rossum (home page: http://www.python.org/~guido/)