https://issues.dlang.org/show_bug.cgi?id=10378

deadalnix <deadal...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |deadal...@gmail.com

--- Comment #9 from deadalnix <deadal...@gmail.com> ---
Proposal:

Free symbol are resolved from the inner scope to the outer scope WITHOUT
considering imports. If that lookup fails, the symbol is searched in import
from the inner scope to the outer scope.

A variant is to aggregate import into the inner scope.

This solution has various advantages:
 - import cannot hijack in module symbols implicitly.
 - import do not need to be processed if local lookup succeed, and doing less
work is always a way to make the compiler faster.

The main difference between the first proposal and the variant is that that in
the first proposal, an inner imported module's symbol can hijack an outer
imported one. In the variant, it doesn't happen, but the import lookup phase
will be much heavier, as the compiler must look into all imported module at
once.

--

Reply via email to