<p dir="ltr">It has been always error to use selective import with FQN. TDPL and documentation says that. And it makes sense from my POV<br>
</p>
<div class="gmail_quote">Dne 22. 2. 2016 16:58 napsal uživatel "Jonathan M Davis via dmd-internals" <<a href="mailto:dmd-internals@puremagic.com">dmd-internals@puremagic.com</a>>:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Monday, February 22, 2016 09:59:31 Steven Schveighoffer via dmd-internals wrote:<br>
><br>
> > On Feb 22, 2016, at 7:04 AM, Jonathan M Davis via dmd-internals <<a href="mailto:dmd-internals@puremagic.com">dmd-internals@puremagic.com</a>> wrote:<br>
> ><br>
> > On Sunday, February 21, 2016 19:08:37 Steven Schveighoffer via dmd-internals wrote:<br>
> >><br>
> >> The key comment in those PRs: <a href="https://github.com/D-Programming-Language/dmd/pull/5426#issuecomment-181589047" rel="noreferrer" target="_blank">https://github.com/D-Programming-Language/dmd/pull/5426#issuecomment-181589047</a><br>
> ><br>
> > Well, while I can see why from an implementation perspective, it makes sense<br>
> > to say that when you have<br>
> ><br>
> > import foo.bar : baz;<br>
> ><br>
> > you haven't really imported the module, so foo.bar.baz isn't legit, and you<br>
> > have to say baz, from a usability perspective, nobody is going to expect<br>
> > that foo.bar.baz suddenly is just baz and not foo.bar.baz, because you<br>
> > imported it with a selective imports.<br>
><br>
> Like the comment says, however, what if you have a local foo symbol defined? The compiler is going to complain, or silently choose one (I think with the new lookup rules, it would choose the local module’s name).<br>
><br>
> With Phobos, this isn’t strictly an issue, since we have no local symbols named std. But I could see lots of problems with other libraries.<br>
<br>
In that case, using static imports makes sense. They're there to avoid name<br>
conflicts when importing a module. But having a symbol be usable and yet not<br>
being able to use its FQN is just plain weird. Given what was said about the<br>
compiler implementation, I can understand why it would end up that way, but<br>
it's very unintuitive, and personally, it makes it so that I'm not<br>
particularly interested in using selective imports. I would not have<br>
expected a symbol to ever lose its FQN. It's not like it changes where it<br>
was declared based on how it was imported, much as the compiler<br>
implementation likes to act that way sometimes.<br>
<br>
- Jonathan M Davis<br>
<br>
<br>
_______________________________________________<br>
dmd-internals mailing list<br>
<a href="mailto:dmd-internals@puremagic.com">dmd-internals@puremagic.com</a><br>
<a href="http://lists.puremagic.com/mailman/listinfo/dmd-internals" rel="noreferrer" target="_blank">http://lists.puremagic.com/mailman/listinfo/dmd-internals</a></blockquote></div>