On 2/22/16 12:53 PM, David Nadlinger via dmd-internals wrote:
On 22 Feb 2016, at 16:56, Jonathan M Davis via dmd-internals wrote:
In that case, using static imports makes sense. They're there to avoid name
conflicts when importing a module. But having a symbol be usable and yet not
being able to use its FQN is just plain weird.

I wouldn't say it's weird at all. Selective imports conceptually act like an 
alias for the symbol in
your local scope. Accordingly, the FQN of the symbol is "where that alias is":

---
module test;
import std.stdio : writeln;
void main() { test.writeln("foo"); }
---

  — David

While I can understand and work with that definition, it's never been the way I've thought of selective import. I always thought of them as exactly like regular imports with a filter applied. IE, import this module, but just this set of symbols instead of all of them.
_______________________________________________
dmd-internals mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/dmd-internals

Reply via email to