2.068.0 regression?

deadalnix via Digitalmars-d digitalmars-d at puremagic.com
Thu Aug 20 14:00:39 PDT 2015


On Thursday, 20 August 2015 at 20:27:58 UTC, Timon Gehr wrote:
>>   - We'd like to be able to lazy import as much as possible. 
>> If import
>> can hijack,
>
> I assume what you mean is if it can cause a compiler error due 
> to ambiguity in cross-scope overloading.
>

Yes, but eve if it doesn't, one need to do a lookup in the 
imports to check, which is undesirable.

>> then it is necessary to process them at least enough to be
>> able to do first level lookup, even if the import is not used.
>
> Makes sense. So the scenario we are looking at here is 
> basically local imports in aggregate scopes, such that the 
> imported symbols are not used in method signatures? Are those 
> common enough to improve performance sufficiently to justify 
> influencing the choice of best semantics? (There are 0 cases in 
> my own code.)

On the long run, it is typical for code to have unused imports, 
especially since we have no linter to warn about them.




More information about the Digitalmars-d mailing list