[dmd-internals] Why are there suddenly tons of deprecation messages about imports in Phobos?

David Nadlinger via dmd-internals dmd-internals at puremagic.com
Mon Feb 22 07:46:10 PST 2016


On 22 Feb 2016, at 13:04, Jonathan M Davis via dmd-internals wrote:
> […] nobody is going to expect
> that foo.bar.baz suddenly is just baz and not foo.bar.baz

I guess that depends heavily on what your mental model of imports is. 
For me, it always was the other way round – I was surprised that the 
fully qualified names were also in scope for selective imports, and 
considered it bad style to use them.

> Personally, it encourages me to not do selective imports if
> they're going to be picky about whether the full import path is used 
> or not.

If you are going to use the fully qualified names anyway there is no 
benefit to selective imports. Just use a static import instead.

  — David


More information about the dmd-internals mailing list