On Thu, 02 Feb 2012 12:53:38 -0500, bearophile <[email protected]> wrote:

Ali:

I think foreach_reverse and the associated opApplyReverse member function.

I use it now and then. A possible replacement:

foreach (i; 10 .. 0 : -1) {}

foreach_reverse is fine to keep for builtins and range specifiers, but I'd really like to get rid of it for every other use. We already have foreach on a delegate to give us the equivalent functionality.

The worst thing is foreach_reverse on a delegate, since the delegate does nothing different when called in "reverse" mode!

-Steve

Reply via email to