> De: "Brian Goetz"
> À: "Remi Forax"
> Cc: "Gavin Bierman" , "amber-spec-experts"
>
> Envoyé: Mardi 9 Avril 2019 21:14:25
> Objet: Re: switch statement and lambda
> I see why this is tempting, but I am going to suggest we wait. As part of
> Valhalla, we would like for `void` to become a real
I see why this is tempting, but I am going to suggest we wait. As part of
Valhalla, we would like for `void` to become a real type some day; that will
require evaluating all the places in the JLS where we treat statement and
expressions differently, or make exceptions like this. Until we’ve
> De: "Gavin Bierman"
> À: "Remi Forax"
> Cc: "amber-spec-experts"
> Envoyé: Mardi 9 Avril 2019 19:28:57
> Objet: Re: switch statement and lambda
>> On 6 Apr 2019, at 21:17, Remi Forax < [ mailto:fo...@univ-mlv.fr |
>> fo...@univ-mlv.fr ] > wrote:
>> Currently this code doesn't compile
>>
> On 6 Apr 2019, at 21:17, Remi Forax wrote:
>
> Currently this code doesn't compile
> IntConsumer c = x -> switch(x) { default -> System.out.println(x); };
>
> I believe it should because this is the basic pattern for supporting the
> actor model,
> you consume a message and do a side