DMD 0.163 release
Derek Parnell
derek at nomail.afraid.org
Wed Jul 19 00:12:52 PDT 2006
On Tue, 18 Jul 2006 23:36:03 -0700, Walter Bright wrote:
> Derek Parnell wrote:
>> Given that the form "static import XXX" and "import XXX = whatever" both
>> require XXX to be used when referencing members, the 'static' import is
>> only required when one is not renaming the module, eg. "import io =
>> std.stdio;" and "static import io = std.stdio;" are identical, I sort of
>> liked the idea that dropped the need for 'static' and if one wanted to
>> force FQN using the normal module name, one could have written "import
>> std.stdio = std.stdio;".
>
> I thought of that too, but it would be a weird special case, as having:
>
> import foo.bar = std.stdio;
>
> would be quite bizarre.
Hmmm... what about ... the situation where I use FQN with a utility module
of some sort, but later I want to try out something different that might
not make the cut. Instead of relocating files or adding mountains of
version statements or recoding to use renamed modules, I could've done ...
version(SuperTest) import util.string = debug.string;
else import util.string;
. . .
util.string.somefunc();
. . .
util.string.anotherfunc();
. . .
util.string.yaf();
Anyhow, just a thought.
--
Derek
(skype: derek.j.parnell)
Melbourne, Australia
"Down with mediocrity!"
19/07/2006 5:08:20 PM
More information about the Digitalmars-d-announce
mailing list