www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - html documentation should show public imports

reply Timothee Cour <thelastmammoth gmail.com> writes:
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?
it's a bit confusing, as searching for 'array' in std.range docs yields
nothing.

My suggestion:

1)
html documentation should show public imports (sometimes such public
imports make sense)

2)
std.range shouldn't contain public import std.array.
Jul 17 2013
next sibling parent "bearophile" <bearophileHUGS lycos.com> writes:
Timothee Cour:

 1)
 html documentation should show public imports (sometimes such 
 public imports make sense)

 2)
 std.range shouldn't contain public import std.array.
Sounds good. Bye, bearophile
Jul 17 2013
prev sibling parent "Jesse Phillips" <Jesse.K.Phillips+D gmail.com> writes:
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.
Jul 18 2013