Mathias Laurenz Baumann Wrote:

> Greetings,
> 
> The following code seems to create a new function call:
> 
> module test;
> void main(char[][] args)
> {
>       return function(int i) { return i+2; }(1);
> }
> 

I guess the compiler could peephole-optimize that. Though: how common would 
that idiom be? Why create a function literal just to call it on the spot? Why 
not use a nested function in the first place?

Reply via email to