www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 320] New: Delegates should be allowed as foreach aggregates

reply d-bugmail puremagic.com writes:
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 digitalmars.com
        ReportedBy: ibisbasenji 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.


-- 
Sep 02 2006
next sibling parent Bruno Medeiros <brunodomedeiros+spam com.gmail> writes:
d-bugmail puremagic.com wrote:
 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 digitalmars.com
         ReportedBy: ibisbasenji 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.
 
 
This one just got implemented. -- Bruno Medeiros - MSc in CS/E student http://www.prowiki.org/wiki4d/wiki.cgi?BrunoMedeiros#D
Oct 18 2006
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=320


braddr puremagic.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED





Added in 0.170


-- 
Oct 18 2006