[Issue 4405] all function - returns whether predicate is true for all elements in a range

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Jun 28 21:20:29 PDT 2010


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



--- Comment #2 from Jonathan M Davis <jmdavisProg at gmail.com> 2010-06-28 21:20:24 PDT ---
I'd love any() since it's nice and clear. It's just that as far as I can tell,
the version of canFind() which takes only a range (along with the predicate) is
exactly what any() would do. There may a difference, but I don't know what it
would be. But even if there isn't, it wouldn't hurt my feelings any to have
any() on top of canFind(). It just seemed likely that someone would complain
that it was cruft to have any() when canFind does exactly what any() would do.
I would prefer an explicit any() though, since it would be clearer in code what
you intended to do.

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