[Issue 8087] New: Improve clarity of std.algorithm documentation

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri May 11 12:20:11 PDT 2012


http://d.puremagic.com/issues/show_bug.cgi?id=8087

           Summary: Improve clarity of std.algorithm documentation
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody at puremagic.com
        ReportedBy: bugzilla at digitalmars.com


--- Comment #0 from Walter Bright <bugzilla at digitalmars.com> 2012-05-11 12:21:36 PDT ---
1. copy's prototype is:

  Range2 copy(Range1, Range2)(Range1 source, Range2 target);

It would be more self-documenting written as:

  OutputRange copy(InputRange, OutputRange)(InputRange source, OutputRange
target);

In general, for all the algorithms that deal with ranges, the range types
should be named after the type of range expected - ForwardRange, InputRange,
BidirectionalRange, etc.


2. map has inconsistent use of element names - calling it x in the description
and e in the example code. Should use the same name in each. Check other
descriptions for similar issues.


3. joiner should include a "See Also" link to the very similar std.range.chain

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list