[dmd-internals] Why are there suddenly tons of deprecation messages about imports in Phobos?
Jonathan M Davis via dmd-internals
dmd-internals at puremagic.com
Mon Feb 22 15:12:39 PST 2016
On Monday, February 22, 2016 12:54:42 Daniel Kozak via dmd-internals wrote:
> On Sunday, 21 February 2016 at 07:47:16 UTC, Jonathan M Davis
> wrote:
> > On Sunday, February 21, 2016 00:38:20 ZombineDev via
> > dmd-internals wrote:
> >> These happened:
> >> https://github.com/D-Programming-Language/dmd/pull/5426 - fix
> >> Issue 313 - Fully qualified names bypass private imports
> >>
> >> https://github.com/D-Programming-Language/dmd/pull/5445 -fix
> >> Issue 10378 - Local imports hide local symbols
> >>
> >> I think similar cases were discussed in the comments on those
> >> pull requests.
> >
> > Wow. All of the comments in the PRs that you guys linked to
> > make this look like quite a mess, even if we're ultimately
> > better off. It does seem pretty messed up to me though that you
> > can't use a symbol's full import path when you've imported it
> > selectively. I would have expected to still be able to do that,
> > just not have access to any of the other symbols in the module
> > that it's in - unless they too were selectively imported.
> >
> > - Jonathan M Davis
>
> From official D documentation (Selective Imports):
> Specific symbols can be exclusively imported from a module and
> bound into the current namespace.
>
> std.stdio.writeln("hello!"); // error, std is undefined
>
> So they never has been intended to works with FQN
Well, if that's the spec, that's the spec (and even if it weren't, if it's
what Walter wanted, he could update the spec), but it's totally unintuitive
IMHO - and not very user friendly either.
- Jonathan M Davis
More information about the dmd-internals
mailing list