----- Mail original -----
> De: "daniel smith" <[email protected]>
> À: "Remi Forax" <[email protected]>
> Cc: "Brian Goetz" <[email protected]>, "amber-spec-experts" 
> <[email protected]>
> 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 <[email protected]> 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