Bug 7357 – Allow `function f = <lambda>` and `delegate d = <lambda>` syntax
Status
RESOLVED
Resolution
WONTFIX
Severity
enhancement
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-01-24T02:08:00Z
Last change time
2016-10-15T01:38:54Z
Assigned to
nobody
Creator
verylonglogin.reg
Comments
Comment #0 by verylonglogin.reg — 2012-01-24T02:08:17Z
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;
---
Comment #1 by bearophile_hugs — 2013-12-07T09:28:42Z
Is this still desired? I don't see much interest in this idea, nor its advantages.