www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 1553] New: foreach_reverse is allowed for delegates

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

           Summary: foreach_reverse is allowed for delegates
           Product: D
           Version: 1.022
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: enhancement
          Priority: P4
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: thecybershadow gmail.com


Suggestion: do not allow to use delegates with foreach_reverse. Since, in the
case of delegates, foreach_reverse is synonymous with foreach, it can be a
cause of bugs, especially in the case of rewriting code that looped over a
pre-built array to loop using a delegate.


-- 
Oct 07 2007