On 4/29/2014 9:13 AM, Steven Schveighoffer wrote:
But what happens when you add another import that conflicts?

module foo;

void func() {}

module prog; // updated
import bar;
import foo;

void main(){
    foo.func(); // now calls foo.func, and not bar.func as it originally did,
right?
}

So by importing from another module, we have silently and drastically changed
the behavior. Have I missed something?

Why is this not a problem?

Because the compiler would now issue an error for that, it's its anti-hijacking feature.

Try it and see!

Reply via email to