On 12/18/13 1:16 PM, Dmitry Olshansky wrote:
19-Dec-2013 01:06, Andrei Alexandrescu пишет:
http://chopapp.com/#fvepfd8 shows the number of dependencies (plus 1)
for each module in phobos. Those include druntime dependencies.


So the bill of using pretty much anything in Phobos is pulling in 87
modules. Pretty much what I feared it is.

There are several directions we can take this.

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).


Andrei


Reply via email to