[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 13:40:05 PST 2016


On 22 Feb 2016, at 22:20, Brad Roberts via dmd-internals wrote:
> 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.

I haven't followed the other recent changes all too closely, but I'm 
under the the impression that they always behaved differently regarding 
overload/conflict resolution, and still do so right now. For example, 
`import a; import b : foo; foo();` would work even if `a` also contained 
`foo()`, while there would normally be a conflict without the selective 
import.

This is not to say that I'm particularly fond of that difference, 
though. I'm just pointing out that what you mention has not been a good 
working model for how selective imports work for quite a long while now 
– the mismatch is not just a consequence of the latest changes.

  — David


More information about the dmd-internals mailing list