What is a stdio module without input capability?
Jarrett Billingsley
kb3ctd2 at yahoo.com
Sat Jul 29 14:51:06 PDT 2006
"Tyro" <ridimz at yahoo.com> wrote in message
news:eafemu$6mc$1 at digitaldaemon.com...
> Answer: std.stdio! About as incomplete and undesirable as they come.
>
> IMNSHO this is a feature that is long overdue. Why exactly do I need call
> upon two separate modules to get the functionality promised in one? Can we
> please get a complete stdio module. I know this is about the last thing on
> the minds of professionals lurking here in D-dom, but for some (myself
> included) it is still very important.
>
> import std.stdio: writef;
> import std.cstream: din;
>
> writef("Something important!\n");
> din.readf(&someInput);
>
> Yes, it is trivial. Yes, it can be accomplished. But it is unintuitive and
> certainly not what is promised by a "stdio" module.
Meh, if you're so worried about using one module, just always use
std.cstream : dout, din. If nothing else, it's more consistent.
dout.writefln("Something important!");
din.readf(&someInput);
Personally I think merging std.stdio and std.cstream would make sense, since
then writef[ln] would just become shims for calling dout.writef[ln], and
there would be readf as a shim for din.readf.
> And while we are on the subject! I know printf() holds a place near and
> dear to the hearts of all those who've ever used it. But since this is D
> and not C, doesn't the D io routines deserve at least the same privileges
> the C ones do? Is their anyway that we can have writef()/writefln() take
> the place of printf() in the object module? Barring that, can they at
> least be included alongside the great printf()?
I hate printf and I hope it dies and is never used all over the phobos
source again.
More information about the Digitalmars-d
mailing list