Bug 8472 – Replace walkLength() with an improved count()
Status
RESOLVED
Resolution
WONTFIX
Severity
enhancement
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-07-30T09:08:00Z
Last change time
2017-07-06T19:17:56Z
Keywords
bootcamp
Assigned to
nobody
Creator
bearophile_hugs
Comments
Comment #0 by bearophile_hugs — 2012-07-30T09:08:02Z
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().
Comment #1 by razvan.nitu1305 — 2017-07-06T19:16:33Z
walkLength wasn't deprecated, but the enhancement for count was added. Since the title is replace walkLength, I'm closing this with WONTFIX.