Streams: an open discussion
Kyle Furlong
kylefurlong at gmail.com
Sat Feb 25 22:39:22 PST 2006
surferjeff at excite.com wrote:
> The interface for InputStream and OutputStream is huge. I often have to create
> my own streambufs in C++, which only requires implementing about 5 methods. If
> I want to write my own class that implements InputStream, then I have to
> implement about 50 methods, and another 50 if I want to implement OutputStream
> too!
>
> It would useful if there were smaller interfaces. For example, a read() method
> and eof() for input, and that's it. Then have a util class that takes one of
> these small interfaces and implements the full 50 methods in the bigger
> interface.
>
> Yes, I could do this in my own code, but I think many people will have to
> re-invent this wheel in D, and each re-invention will be different and not
> interchangeable.
>
>
Phobos sucks. There I said it. :-)
In other news, there is a library called Mango on www.dsource.org which you may find useful.
More information about the Digitalmars-d
mailing list