feature request, refactor std.stream.Stream

Sean Kelly sean at f4.ca
Thu Dec 28 07:39:35 PST 2006


BCS wrote:
> The InputStream and OutputStream interfaces are all but unusable because 
> they have such a huge number of methods to implements, however most of 
> them are implemented by the Stream class in a vary abstract way (all 
> build on 4 or 5 low level methods). This is all well and good until you 
> want to implement Input/OutputStream with some other class (Thread in my 
> case)
> 
> Why not put all of those function in a pair of mixins? Then anyone who 
> needs to make a stream like object could just implement the half dozen 
> low level things and mix in a big chunk of code.

You mean like this?

http://www.invisibleduck.org/~sean/code/stream.d


Sean



More information about the Digitalmars-d mailing list