On 12/18/2013 1:40 PM, Andrei Alexandrescu wrote:
1. Improve the compiler to handle imports lazily, i.e. an unused import is never
opened. That's unlikely to help a lot of uses because most unqualified name
lookups require all imports to be loaded (even after the name if resolved, the
compiler must still look for ambiguities).
2. Push imports from top level into the entities (functions, classes etc) that
use them.
3. Apply classic dependency management (break larger modules in smaller ones,
accept some code duplication etc).
I favor (2).
(1) is impractical for the reasons you mentioned.
I favor (2), and also (4):
4. Break kitchen sink modules like std.algorithm into one module per algorithm.
This should not result in code duplication.