std.file, std.stdio(File), std.stream(File:Stream)

H. S. Teoh hsteoh at quickfur.ath.cx
Tue May 15 09:48:23 PDT 2012


On Tue, May 15, 2012 at 07:47:24PM +0400, Dmitry Olshansky wrote:
> On 15.05.2012 19:32, H. S. Teoh wrote:
> >On Tue, May 15, 2012 at 05:14:15PM +0200, ref2401 wrote:
> >>general question:
> >>-std.file,
> >
> >std.file is badly named. It really deals with the _filesystem_, that is,
> >pathnames, etc.. It doesn't deal with individual files.
> >
> 
> Bleh, std.file.read does just that - reads entire file into memory.
> In essence std.file works with filesystem and files, and unit of
> work is a file.
[...]

OK, that is totally deserving of a WAT. The split between std.file,
std.stdio, std.stream, etc., are just soooo illogical. I'm hoping that
std.io will eventually clear up this crazy mess, but I suspect std.file
will still remain. Is there any logical reason why we shouldn't rename
it to std.filesystem or std.fs? Calling it std.file is needlessly
confusing, esp. given that most of the functions actually concerned with
file I/O are in std.stdio (or the future std.io).


T

-- 
Give a man a fish, and he eats once. Teach a man to fish, and he will sit forever.


More information about the Digitalmars-d-learn mailing list