[Issue 320] New: Delegates should be allowed as foreach aggregates

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Sep 2 20:24:26 PDT 2006


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

           Summary: Delegates should be allowed as foreach aggregates
           Product: D
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P3
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: ibisbasenji at gmail.com


Seeing as how foreach works on objects by calling a method with a certain
signature, it should be feasible to allow delegates with that same signature as
the aggregate.  This would provide a clear selective iteration concept, and
with the use of delegate literals and delegates to nested functions, could
possibly lead to a number of new design patterns.


-- 




More information about the Digitalmars-d-bugs mailing list