www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 8087] New: Improve clarity of std.algorithm documentation


           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 puremagic.com
        ReportedBy: bugzilla digitalmars.com

--- Comment #0 from Walter Bright <bugzilla 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

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: -------
May 11 2012