phobos dependencies
Dicebot
public at dicebot.lv
Wed Dec 18 16:14:05 PST 2013
On Wednesday, 18 December 2013 at 21:40:08 UTC, 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).
>
>
> Andrei
2 + 3 (breaking modules into packages part) should do the tricky
as far as I can see. Lot of current dependency bloat comes from
importing whole std.range / std.algorithm to use one or two
utility functions in few places.
On topic of (2) I propose to add it to Phobos style guide and
start enforcing during PR review.
More information about the Digitalmars-d
mailing list