Massimiliano Mirra <list / chromatic-harp.com> writes:

> On Thu, Feb 28, 2002 at 03:50:10AM +0900, Matt Armstrong wrote:
>> It would be cool if classes like MultipartReader could implement a few
>> simple methods (like read and optionally seek) and then be passed to
>> an IO::Wrapper class that turned them into full fledged objects that
>> had all the neat methods of IO like each, each_byte, each_line, eof,
>> eof?, getc, gets, lineno, print, printf, seek, etc.
>
> This sounds a lot like implementing a <=>(other) method, then
> including the Comparable module and getting other comparison
> operators, doesn't it?

Sure does.

I suppose the hard part would be coming up with the reasonable subset
of methods needed by the IO::Wrapper module, and then implementing the
module in terms of those methods (in C, I'd expect).

-- 
matt