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

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Nov 3 16:58:51 PDT 2012


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


Andrej Mitrovic <andrej.mitrovich at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |andrej.mitrovich at gmail.com


--- Comment #7 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2012-11-03 16:58:47 PDT ---
(In reply to comment #6)
> (In reply to comment #5)
> > (In reply to comment #4)
> > > ...
> > > There’s a popFront() function, so why would it be the correct way to search?
> > > Reusing a « linear search » code is not a point here because we want to _find_
> > > something. countUntil gives us the position of an element, find should give
> > > whether the element is or not in a range.
> > 
> > Well, no.
> > 
> > > It returns a range: why ?
> > > ...
> > 
> > Because that is its specification. What is the issue?
> 
> The issue is: a function that is designed to « search » for something is
> excepted to return a boolean, not top popFront() shit and returns the result
> range…

Then use canFind.

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