std.file vs std.stream

Lars T. Kyllingstad public at kyllingen.NOSPAMnet
Thu Mar 4 12:50:41 PST 2010


Ali Çehreli wrote:
> Lars T. Kyllingstad wrote:
> 
>  > What you're seeing here is actually a consequence of Phobos very much
>  > being a work-in-progress.  std.stdio was completely rewritten about a
>  > year ago, and it most likely contains what you're looking for.
>  >
>  > std.stream, on the other hand, hasn't seen major updates since 2005 or
>  > so, and is most likely an old left-over from D1.  I suspect it will be
>  > removed soon, or at least completely rewritten to adhere to the range
>  > interface.
> 
> I've been using std.stream.File because it uses the generic Stream 
> interface like dout and din does.
> 
> Using std.stream.File should allow cleaner template code without needing 
> 'static if' and other conditional compilation features.

Unfortunately it has the major drawback of not working anymore when 
std.stream is deprecated.

-Lars


More information about the Digitalmars-d-learn mailing list