phobos dependencies

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Wed Dec 18 15:39:59 PST 2013


On 12/18/13 3:08 PM, Walter Bright wrote:
> 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.

That's (3), which enumerates a number of possible effects that may or 
may not overlap/

Andrei



More information about the Digitalmars-d mailing list