Syntax decision

Klaus Malorny Klaus.Malorny at knipp.de
Fri Sep 30 00:33:53 PDT 2011


> Here are some examples of lambda expressions using this syntax:
>
> [...]
>
>    () => { System.out.println("I am a Runnable"); }

Hi,

for the no-args case, wouldn't it be nice just to write a block with curly 
braces? I.e.

   Executor ex = ...
   ex.execute ({ System.out.println ("Hello world!"); });

Or would it be in syntactical conflict with other language constructs?

Regards,

Klaus


More information about the lambda-dev mailing list