phobos dependencies

Andrej Mitrovic andrej.mitrovich at gmail.com
Thu Dec 19 00:38:40 PST 2013


On 12/19/13, Meta <jared771 at gmail.com> wrote:
> For example, when you want to use sort, find, splitter and swap
> all together, you either have the choice of doing:
>
> import std.algorithm;
>
> And pull in everything, or doing:
>
> import std.algorithm.sort, std.algorithm.find,
> std.algorithm.splitter, std.algorithm.swap;
>
> Or is there something I'm missing here?

Hopefully we would add a feature that implements selective module imports, e.g.:

// either a symbol in the algorithm.d/package.d module or
// another module in the algorithm package *if* std.algorithm is a package.
import std.algorithm : sort;

I think there's a bugzilla enhancement for this.


More information about the Digitalmars-d mailing list