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


Steven Schveighoffer <schvei...@yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |schvei...@yahoo.com


--- Comment #10 from Steven Schveighoffer <schvei...@yahoo.com> 2011-03-04 
05:44:27 PST ---
Couldn't walkLength simply be redefined to accept an isIterable argument?  That
covers ranges, opApply, and properly formed delegates.

And to answer Jonathan, opApply has very important features that ranges do not.
 First and foremost, it can use the stack for iteration.  This allows things
like indexed iteration, iterating trees, and efficient iterating via a virtual
interface.

Second, ranges do not yet allow more than one item while iterating.  I can't
do:

foreach(i, x; r)

on a range.

Not saying opApply is better in all cases, ranges do have just as important
features, but opApply is more useful in certain important situations.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to