Import concerns revisited
Georg Wrede
georg.wrede at nospam.org
Tue Jul 11 23:25:50 PDT 2006
Regan Heath wrote:
> There seems to me to only be a minor difference in functionality between..
>
> import std.stdio;
> alias std.stdio io;
>
> writefln(""); //ok
> io.writefln(""); //ok
>
> and..
>
> import std.stdio as io;
>
> writefln(""); //error
> io.writefln(""); //ok
>
> in that the latter syntax allows the compiler to _not_ import into the
> 2ndary namespace and _instead_ into the named one, instead of doing
> both, which is what appears does/will happen using 'alias'. I prefer this.
Exactly!
And this is *very important*.
More information about the Digitalmars-d
mailing list