(In reply to comment #0)
> import std.stdio, std.file;
> string s, fn;
> write(fn, s);
>
> I think there should be a writeFile alias to avoid this conflict.
There's a ton of these in Phobos (another common example is `copy`), and they're not a problem due to how the module system works.
Your example is correctly an error. It's up to the user to disambiguate - the user has a ton of options in doing so, including:
1 ----
import std.stdio;
static import std.file;
string s, fn;
write(fn, s);
std.file.write(fn, s);
------
2 ----
import std.stdio;
import file = std.file;
string s, fn;
write(fn, s);
file.write(fn, s);
------
3 ----
import std.stdio : stdoutWrite = write;
import std.file : fileWrite = write;
string s, fn;
stdoutWrite(fn, s);
fileWrite(fn, s);
------
4 ----
import std.stdio;
void func()
{
import std.file;
string s, fn;
.write(fn, s);
write(fn, s);
}
-----
The list goes on forever. Closing this because this is by design - if you still have a problem with that design, it would need some serious convincing on the NG to warrant any changes.
Comment #3 by github-bugzilla — 2016-03-27T18:10:27Z