Thread overview
[Issue 320] New: Delegates should be allowed as foreach aggregates
Sep 03, 2006
d-bugmail
Oct 18, 2006
Bruno Medeiros
Oct 18, 2006
d-bugmail
September 03, 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@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.


-- 

October 18, 2006
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
October 18, 2006
http://d.puremagic.com/issues/show_bug.cgi?id=320


braddr@puremagic.com changed:

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




------- Comment #1 from braddr@puremagic.com  2006-10-18 12:15 -------
Added in 0.170


--