Why does std.string use public imports?

Andrej Mitrovic andrej.mitrovich at gmail.com
Thu Jun 30 16:14:19 PDT 2011


I'm referring to these two in std.string:
public import std.algorithm : startsWith, endsWith, cmp, count;
public import std.array : join, split;

Because whenever I try to use .count in my code:

import std.stdio;
import std.string;
import std.utf;

void main()
{
    writeln("foo".count);
}

std.utf.count conflicts with std.string's publicly imported std.algorithm.count

Can we avoid public imports in modules? The rise of conflicts in
Phobos is getting slightly annoying.


More information about the Digitalmars-d-learn mailing list