----- Mail original -----
> De: "daniel smith" <daniel.sm...@oracle.com>
> À: "Remi Forax" <fo...@univ-mlv.fr>
> Cc: "Brian Goetz" <brian.go...@oracle.com>, "amber-spec-experts" 
> <amber-spec-experts@openjdk.java.net>
> Envoyé: Mercredi 11 Avril 2018 00:20:01
> Objet: Re: Switch expressions -- gathering the threads

>> On Apr 10, 2018, at 2:30 PM, Remi Forax <fo...@univ-mlv.fr> wrote:
>> 
>> I'm not sure this difference is important.
>> 
>> What about the example below, multiple labels or a fallthrough ?
>>   switch(x) {
>>       case 0:
>>         ;
>>       case 1:
>>   }
> 
> My request is to call this an example of fallthrough.
> 
> I think you're trying to make a point that some forms of switches with
> fallthrough behave the same as switches with multiple labels. Sure, that's
> fine. I still think it's helpful to talk about the two cases separately, as
> distinct features, because the practical use cases are very different.

I think is see all forms as being fallthrough and what you call a multiple 
labels form as the result after a peephole optimization, i.e if there is no 
instruction between the two cases, then the compiler will make them share the 
same label.

> 
> —Dan

Rémi

Reply via email to