Petition to chime in Issue 1553 - foreach_reverse is allowed for delegates

Marco Leise Marco.Leise at gmx.de
Fri Oct 25 06:47:34 PDT 2013


Am Sun, 20 Oct 2013 15:55:41 +0200
schrieb "Peter Alexander" <peter.alexander.au at gmail.com>:

> On Sunday, 20 October 2013 at 12:33:27 UTC, bearophile wrote:
> > Denis Shelomovskij:
> >
> >> Issue URL: http://d.puremagic.com/issues/show_bug.cgi?id=1553
> >
> > I suggest to keep foreach_reverse in the language, but 
> > statically disallow it on delegates.
> 
> +1

+1

Often enough I see code that iterates forwards and backwards
over something. foreach and foreach_reverse make the syntax
look the same. I don't like the idea of plugging in
reverse ranges into foreach to get the same effect.

-- 
Marco



More information about the Digitalmars-d mailing list