On 2/22/16 1:40 PM, David Nadlinger via dmd-internals wrote:
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

I understand and acknowledge that. However, in my cases (which I admit aren't terribly significant) it's worked out correctly.

What I'm trying to say is how I've expected them to work. I really don't think tacking on a filter list should be changing the semantics. A lot of the time I start off with just "import foo" and then later trim that down to "import foo : sym1, sym2, etc" based on what I ended up using. IMHO, that change should be _trivially_ correct. And it's actually not given the current (and past) definition.
_______________________________________________
dmd-internals mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/dmd-internals

Reply via email to