On 2011-09-03 19:54:05 +0000, Andrei Alexandrescu <seewebsiteforem...@erdani.org> said:

Hello,


There are a number of issues related to D's current handling of streams, including the existence of the imperfect etc.stream and the over-specialization of std.stdio.

Steve has worked on an extensive overhaul of std.stdio which would obviate the need for etc.stream and would improve both the generality and efficiency of std.stdio.

Please chime in with feedback; he's away from the Usenet but allowed me to post this on his behalf. I uploaded the docs to

http://erdani.com/d/new-stdio/phobos-prerelease/std_stdio.html

Looks good…

Hum, inconsistent casing of enum members.

And shouldn't there be a way to do non-blocking IO? ;-)

I like that File is now a class because it's cleaner that way, but non-deterministic destruction is going to be a problem. That said, it was already a problem anyway if you stored a File struct in a class, so maybe we need a more general solution for reference-counted classes.

Class names DInput and DOutput sounds silly. If all classes implemented purely in D had a D prefix, it'd get redundant pretty fast (like KDE apps beginning in K). I'd suggest BufferedInput and BufferedOutput, or something else that actually describes what the class does, instead of DInput and DOutput. And I'd make them final, that way there won't be any virtual call overhead until the buffer needs to be replenished or flushed from the wrapped input or output stream.


--
Michel Fortin
michel.for...@michelf.com
http://michelf.com/

Reply via email to