Question about latest binary build

Gregg Wonderly gregg at wonderly.org
Thu Jul 19 12:44:01 PDT 2012


Yes, it seems like there should be support for this, if all the other generic evaluation could complain about void not being assignable.

Gregg

Sent from my iPad

On Jul 19, 2012, at 2:37 PM, Marcus Thiesen <marcus at thiesen.org> wrote:

> 2012/7/19 Dan Smith <daniel.smith at oracle.com>:
>> Runnable r = () -> list.add("hi");
>> 
>> Seems convenient, but causes trouble for overload resolution.  So for now, this is not allowed (pending further discussion).  You would need to use a block instead:
>> 
>> Runnable r = () -> { list.add("hi"); };
> 
> Please do not make me think about the return values of the method I
> call when writing a Lambda.
> 
> For the sake of consistency I would always opt for one way to write a
> lambda, even if it makes me write the block around the lambda body all
> the time.
> 
> BTW, I only found that because examples I wrote for an older version
> of the compiler stopped compiling. So these "relaxed rules" had been
> implemented at some point in time.
> 
> Have fun,
>  Marcus
> 
> 
> -- 
> Marcus Thiesen :: www.thiesen.org :: @mthiesen :: 0173 / 28 01 82 4
> 


More information about the lambda-dev mailing list