DMD 0.163 release
Walter Bright
newshound at digitalmars.com
Wed Jul 19 17:11:30 PDT 2006
Andrei Khropov wrote:
>> If we can use FQN access a symbol directly, not need any importing, all
>> things going bo be consistent and natural.
>>
>> int main(void)
>> {
>> std.stdio.writefln("Just do it"); // not need any importing
>> ...
>> }
>
> Well, it's how C# (and other .NET languages) does that.
>
> But I think explicit module declarations are more informative
> (you just look at the beginnig of the file to find out what it depends on)
> and also aids tools like Build (no need to parse all the code to figure out
> dependencies)
I agree. There needs to be some 'anchor' that says where the names are
coming from. Otherwise, the compiler can't tell the difference between
an undefined identifier and a file not found. Even worse, a misspelled
identifier can result in some odd module being imported, and all kinds
of mischief.
Just like implicit declaration of variables is a bad idea, implicit
importing is a bad idea.
More information about the Digitalmars-d-announce
mailing list