Closures not yet supported in CTFE's

anonymous anonymous at example.com
Sat Jul 27 19:54:12 PDT 2013


On Sunday, 28 July 2013 at 01:17:00 UTC, Meta wrote:
[...]
> It was a source of confusion for me at first as well, as I 
> expected `a => { ... }` to behave as it does in C#. That's not 
> the case, unfortunately, as { ... } is a delegate literal in D, 
> so you have to use the full `(a) { ... }` syntax.

That "full" syntax is (a tiny tad) shorter than C#'s though:
(a) { ... }
a => { ... }


More information about the Digitalmars-d-learn mailing list