digitalmars.D - stdio.d & stream.d
- Mista (5/5) Aug 21 2004 I switched from v0.95 to v0.100 and now i get the following error messag...
- Mista (7/13) Aug 21 2004 line 9 of phobos\std\stdio.d has been changed in v0.100 from
- Arcane Jill (7/13) Aug 21 2004 Oh yuk!
- Benjamin Herr (4/6) Aug 21 2004 What happened to the notion to make import privately import by default?
- antiAlias (8/21) Aug 21 2004 Absolutely. Imports should be private by default; there's no practical
- Arcane Jill (15/22) Aug 21 2004 It's worth remembering what C++ did.
- Regan Heath (7/10) Aug 22 2004 On Sat, 21 Aug 2004 20:12:28 +0000 (UTC), Arcane Jill
I switched from v0.95 to v0.100 and now i get the following error message: C:\DMD\BIN\..\src\phobos\std\stream.d(2072): variable stdout conflicts with stdio.stdout at C:\DMD\BIN\..\src\phobos\std\c\stdio.d(131) C:\DMD\BIN\..\src\phobos\std\stream.d(2072): variable stdin conflicts with stdio.stdin at C:\DMD\BIN\..\src\phobos\std\c\stdio.d(130)
Aug 21 2004
Mista wrote:I switched from v0.95 to v0.100 and now i get the following error message: C:\DMD\BIN\..\src\phobos\std\stream.d(2072): variable stdout conflicts with stdio.stdout at C:\DMD\BIN\..\src\phobos\std\c\stdio.d(131) C:\DMD\BIN\..\src\phobos\std\stream.d(2072): variable stdin conflicts with stdio.stdin at C:\DMD\BIN\..\src\phobos\std\c\stdio.d(130)line 9 of phobos\std\stdio.d has been changed in v0.100 from private import std.c.stdio; to import std.c.stdio; I changed it back to the way it was in v0.95 and that works, but i guess the change was made for a reason.
Aug 21 2004
In article <cg7bt2$1rv0$1 digitaldaemon.com>, Mista says...line 9 of phobos\std\stdio.d has been changed in v0.100 from private import std.c.stdio; to import std.c.stdio;Oh yuk! If I choose to import std.c.stdio, I'd prefer to say so with an import statement of my own. Non-private imports within libraries are just plain rude.I changed it back to the way it was in v0.95 and that works, but i guess the change was made for a reason.Well, I hope it's an honest mistake. Polluting my namespace against my will on purpose should be a punishable offense. Jill
Aug 21 2004
Arcane Jill wrote:Well, I hope it's an honest mistake. Polluting my namespace against my will on purpose should be a punishable offense.What happened to the notion to make import privately import by default? Might break some old code, but nothing that cannot be fixed with some quick :%s/import/public import/g or the like.
Aug 21 2004
Absolutely. Imports should be private by default; there's no practical reason for them to be otherwise. In fact, if they were private by default, I'd imagine the compiler might actually be a little faster on larger projects <g> "Arcane Jill" <Arcane_member pathlink.com> wrote in message news:cg882a$2asb$1 digitaldaemon.com...In article <cg7bt2$1rv0$1 digitaldaemon.com>, Mista says...statementline 9 of phobos\std\stdio.d has been changed in v0.100 from private import std.c.stdio; to import std.c.stdio;Oh yuk! If I choose to import std.c.stdio, I'd prefer to say so with an importof my own. Non-private imports within libraries are just plain rude.will onI changed it back to the way it was in v0.95 and that works, but i guess the change was made for a reason.Well, I hope it's an honest mistake. Polluting my namespace against mypurpose should be a punishable offense. Jill
Aug 21 2004
In article <cg7bt2$1rv0$1 digitaldaemon.com>, Mista says...Mista wrote:It's worth remembering what C++ did. C++ made compatibility with C not just a desirable thing, but an absolute requirement, and so "stdin" and "stdout" had to retain their old C usage. But STL introduced std::streams, and these streams also had their own concept of "standard input" and "standard output". How did they resolve the problem? Did they use the old names but put them in a new namespace? No - they called the new streams "cin" and "cout" to completely avoid conflict. Presumably, D could do the same - rename std.stream.stdin as std.stream.cin and std.stream.stdout as std.stream.cout. Voila, no conflict. Of course, what I'd /prefer/ is that we didn't get a load of junk thrown into our namespaces as a consequence of non-private imports within libraries, but I mention this as a second possible resolution in case for some horrible reason those non-private imports can't be got rid of. Arcane JillI switched from v0.95 to v0.100 and now i get the following error message: C:\DMD\BIN\..\src\phobos\std\stream.d(2072): variable stdout conflicts with stdio.stdout at C:\DMD\BIN\..\src\phobos\std\c\stdio.d(131) C:\DMD\BIN\..\src\phobos\std\stream.d(2072): variable stdin conflicts with stdio.stdin at C:\DMD\BIN\..\src\phobos\std\c\stdio.d(130)
Aug 21 2004
On Sat, 21 Aug 2004 20:12:28 +0000 (UTC), Arcane Jill <Arcane_member pathlink.com> wrote: <snip>Presumably, D could do the same - rename std.stream.stdin as std.stream.cin and std.stream.stdout as std.stream.cout. Voila, no conflict.What about din and dout <g> Regan -- Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
Aug 22 2004