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

Jesse Phillips Jesse.K.Phillips+D at gmail.com
Sun Oct 20 14:54:15 PDT 2013


On Sunday, 20 October 2013 at 11:29:38 UTC, Denis Shelomovskij 
wrote:
> `foreach_reverse` is allowed for delegates and do what 
> `foreach` do thus causing dangerous confusion. Walter Bright is 
> the only one for some obscure reason definitely for not 
> deprecating this feature and WONTFIX-ed the issue. And yes, no 
> big red note in docs about it. As always, this is even more 
> error-prone for highly templated language like D (i.e. one can 
> expect in template `foreach_reverse` will not compile if 
> reverse iteration isn't supported).
>
> Petition for all not indifferent to language misfeatures to 
> chime in and show in this thread we all are for deprecating it 
> (if we really are).
>
> Issue URL: http://d.puremagic.com/issues/show_bug.cgi?id=1553
>
> Thanks.

I don't use foreach_reverse and don't intend to. I allowing 
delegates is error prone if it is just going to do what foreach 
does.


More information about the Digitalmars-d mailing list