html documentation should show public imports
Jesse Phillips
Jesse.K.Phillips+D at gmail.com
Thu Jul 18 12:50:48 PDT 2013
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.
More information about the Digitalmars-d-learn
mailing list