On Thursday, 18 July 2013 at 00:39:33 UTC, Timothee Cour wrote:
std.range contains public import std.array.
There are a few full module public imports like that in phobos.
What's the
rationale?
I understand for hierarchical modules (breaking modules into
packages) but
for this?
I'm pretty sure that std.array is publicly imported since without
it an array isn't a range. If your module works on ranges it must
support arrays (if your module is template heavy).
string[] myList; ...
std.algorithm.sort(myList);
This would fail if std.array wasn't imported by std.algorithm and
there is nothing you'd be able to do about it from outside
std.algorithm.