phobos dependencies
Idan Arye
GenericNPC at gmail.com
Thu Dec 19 05:09:37 PST 2013
On Wednesday, 18 December 2013 at 21:40:08 UTC, Andrei
Alexandrescu wrote:
> 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
I suggested 2 a half a year ago -
http://forum.dlang.org/thread/rrjaopnvapwhbatlsyvo@forum.dlang.org
One of the
replys(http://forum.dlang.org/thread/rrjaopnvapwhbatlsyvo@forum.dlang.org#post-heaeasepzokrwdsvytbe:40forum.dlang.org)
mentioned an
issue(https://d.puremagic.com/issues/show_bug.cgi?id=7016) that
blocks this solution.
More information about the Digitalmars-d
mailing list