std.stream replacement

BLM768 blm768 at gmail.com
Fri Mar 8 20:13:52 PST 2013


> One thing to remember is that streams need to be runtime 
> swappable.  For instance, I should be able to replace stdout 
> with a stream of my choice.

That does make my solution a little tougher to implement. Hmmm...

It looks like a monolithic type is the easiest solution, but it 
definitely should have range support somewhere. Since that's 
already planned (at least as I understand it), I guess I don't 
really have any complaints about it.

Now, I wouldn't mind if you made the default source a 
"block-input range", since it could have very similar performance 
characteristics to an integrated source and would provide a 
useful range for other stuff, but an integrated source would be 
manageable and probably just a hair faster.




More information about the Digitalmars-d mailing list