[Issue 8472] New: Replace walkLength() with an improved count()

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Jul 30 09:08:03 PDT 2012


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

           Summary: Replace walkLength() with an improved count()
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Phobos
        AssignedTo: nobody at puremagic.com
        ReportedBy: bearophile_hugs at eml.cc


--- Comment #0 from bearophile_hugs at eml.cc 2012-07-30 09:08:02 PDT ---
This is related to the refused enhancement in Issue 8467

Given that issue 8467 says that the "pred" template argument of
std.algorithm.count() can't be changed, then I suggest:

1) To introduce an optimization inside std.algorithm.count(): if the "pred"
template argument was not changed by the programmer (so it's equal to "true"),
and the given range defines a length, then to return that length value.

2) To deprecate std_range.walkLength() because now its purposes are replaced by
std.algorithm.count().

-- 
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