digitalmars.D - 4 Qs about std.stdio
- Carlos Santander B. (14/14) Jan 31 2005 Walter, I have 4 questions about std.stdio. They're just pure, honest
- Walter (6/20) Jan 31 2005 Because I viewed std.stdio as extending std.c.stdio, not replacing it.
- Ben Hinkle (12/17) Jan 31 2005 already done. The std.stream equivalent to
- Walter (3/4) Jan 31 2005 doh! You're right.
- Carlos Santander B. (6/35) Feb 01 2005 I'm not sure why, but I kinda feel uneasy about that. I don't know about...
Walter, I have 4 questions about std.stdio. They're just pure, honest ignorance, nothing else. 1. Why is std.c.stdio publicly imported? (notice std.utf and std.format are private) 2. std.stdio defines FPUTC et al. Why are they public? 3. Why keep std.c.stdio.FILE instead of using std.stream.Stream? Ok, maybe for the internal representantion (because writex works with std.c.stdio), but fwritef/fwritefln (IMHO) should get a Stream, and not a FILE *. I mean, we're trying to leave C behind, right? 4. Will we ever see a readf or similar in Phobos? (1) and (2) are just because I think the namespace could get too bloated, and that doesn't seem to be a good thing. _______________________ Carlos Santander Bernal
Jan 31 2005
"Carlos Santander B." <csantander619 gmail.com> wrote in message news:ctmjp1$23i5$1 digitaldaemon.com...Walter, I have 4 questions about std.stdio. They're just pure, honest ignorance, nothing else. 1. Why is std.c.stdio publicly imported? (notice std.utf and std.format are private)Because I viewed std.stdio as extending std.c.stdio, not replacing it.2. std.stdio defines FPUTC et al. Why are they public?No good reason.3. Why keep std.c.stdio.FILE instead of using std.stream.Stream? Ok, maybe for the internal representantion (because writex works with std.c.stdio), but fwritef/fwritefln (IMHO) should get a Stream, and not a FILE *. I mean, we're trying to leave C behind, right?I suggest adding a writef to std.stream.4. Will we ever see a readf or similar in Phobos?Yes.(1) and (2) are just because I think the namespace could get too bloated, and that doesn't seem to be a good thing. _______________________ Carlos Santander Bernal
Jan 31 2005
already done. The std.stream equivalent to import std.stdio; int main() { writefln("hello world"); return 0; } is import std.stream; int main() { stdout.writefln("hello world"); return 0; }3. Why keep std.c.stdio.FILE instead of using std.stream.Stream? Ok, maybe for the internal representantion (because writex works with std.c.stdio), but fwritef/fwritefln (IMHO) should get a Stream, and not a FILE *. I mean, we're trying to leave C behind, right?I suggest adding a writef to std.stream.
Jan 31 2005
"Ben Hinkle" <ben.hinkle gmail.com> wrote in message news:ctmrou$2aol$1 digitaldaemon.com...already done.doh! You're right.
Jan 31 2005
Walter wrote:"Carlos Santander B." <csantander619 gmail.com> wrote in message news:ctmjp1$23i5$1 digitaldaemon.com...I'm not sure why, but I kinda feel uneasy about that. I don't know about the rest of the guys. But, if that's what you think, that's what you think.1. Why is std.c.stdio publicly imported? (notice std.utf and std.format are private)Because I viewed std.stdio as extending std.c.stdio, not replacing it.Good! _______________________ Carlos Santander Bernal2. std.stdio defines FPUTC et al. Why are they public?No good reason.3. Why keep std.c.stdio.FILE instead of using std.stream.Stream? Ok, maybe for the internal representantion (because writex works with std.c.stdio), but fwritef/fwritefln (IMHO) should get a Stream, and not a FILE *. I mean, we're trying to leave C behind, right?I suggest adding a writef to std.stream.4. Will we ever see a readf or similar in Phobos?Yes.
Feb 01 2005