www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 7357] New: Allow `function f = <lambda>` and `delegate d = <lambda>` syntax

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

           Summary: Allow `function f = <lambda>` and `delegate d =
                    <lambda>` syntax
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P3
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: verylonglogin.reg gmail.com



---
Now we have the following syntax to specify is lambda a function or a delegate:
---
auto f = function(int i) => i;
auto d = delegate(int i) => i;
---

Maybe this will be useful too (it looks consistent with const, immutable,
etc.):
---
function f = (int i) => i;
delegate d = (int i) => i;
---

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 24 2012