[Issue 8946] « any » function does not what it should do

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Nov 3 14:09:30 PDT 2012


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



--- Comment #2 from Dimitri Sabadie <dimitri.sabadie at gmail.com> 2012-11-03 14:09:28 PDT ---
(In reply to comment #1)
> Ever heard of slicing an array in D? 
> 
> Check this out: http://dlang.org/d-array-article.html
> 
> Dig down in std.algotrithm.find and you'll find out that it's lazy iterates a
> forward range. Thus like the most of std.algorithm functions it DOESN'T
> allocate. In case of array it just returns a slice of original array.
> 
> So this report is invalid.

Ok, my argument wasn’t worth it I agree. But, why any would use such a function
where a simple loop and a test will do it? It’s the same argument for not to
use countUntil and check if the index is invalid, it consumes more memory that
we want. any does things we don’t want to IMHO.

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