Re: Call for bikeshed -- break replacement in expression switch

2019-05-17 Thread Remi Forax
- Mail original - > De: "John Rose" > À: "Alex Buckley" > Cc: "amber-spec-experts" > Envoyé: Vendredi 17 Mai 2019 03:15:36 > Objet: Re: Call for bikeshed -- break replacement in expression switch > On May 16, 2019, at 2:43 PM, Alex Buckley wrote: >> >> If you're proposing to

Re: Call for bikeshed -- break replacement in expression switch

2019-05-17 Thread Remi Forax
- Mail original - > De: "Guy Steele" > À: "Maurizio Cimadamore" > Cc: "amber-spec-experts" , "Éamonn > McManus" > Envoyé: Jeudi 16 Mai 2019 23:41:05 > Objet: Re: Call for bikeshed -- break replacement in expression switch >> On May 16, 2019, at 5:05 PM, Maurizio Cimadamore >> wrote:

Re: Call for bikeshed -- break replacement in expression switch

2019-05-17 Thread Remi Forax
- Mail original - > De: "John Rose" > À: "Brian Goetz" > Cc: "amber-spec-experts" > Envoyé: Vendredi 17 Mai 2019 08:41:20 > Objet: Re: Call for bikeshed -- break replacement in expression switch > (Going back to the start of this thread.) > > On May 12, 2019, at 12:38 PM, Brian Goetz

Re: Re: Call for bikeshed -- break replacement in expression switch

2019-05-17 Thread Manoj Palat
Hi, I have a few points regarding this – since there was a flurry of mails last night/day, I have given references below to specific threads below: -As Maurizio pointed out in https://mail.openjdk.java.net/pipermail/amber-spec-experts/2019-May/001334.html , “yield” is not really a

Re: Call for bikeshed -- break replacement in expression switch

2019-05-17 Thread Doug Lea
On 5/17/19 2:41 AM, John Rose wrote: > > "break ->" could break out of a statement introduced with "->". > Not bad. This is now my second choice vote. (Behind unary "^".) -Doug

Re: Call for bikeshed -- break replacement in expression switch

2019-05-17 Thread Guy Steele
Sent from my iPhone > On May 17, 2019, at 2:30 AM, Remi Forax wrote: > > - Mail original - >> De: "Guy Steele" >> À: "Maurizio Cimadamore" >> Cc: "amber-spec-experts" , "Éamonn >> McManus" >> Envoyé: Jeudi 16 Mai 2019 23:41:05 >> Objet: Re: Call for bikeshed -- break replacement

Re: Yield as contextual keyword (was: Call for bikeshed -- break replacement in expression switch)

2019-05-17 Thread Remi Forax
Thanks for providing a clear view of our options. I vote for B. I will add that obviously there is no switchy block that contains an unqualified yield in the actual code so the compiler should emit an error instead of a warning if there is an unqualified yield in the scope of the switchy

Re: Call for bikeshed -- break replacement in expression switch

2019-05-17 Thread Dan Smith
> On May 16, 2019, at 2:28 PM, John Rose wrote: > > Chapter 1. Some constructs have arrows. > They define when the arrow bodies are executed, > and, if the the arrow gets tossed a value, what > is done with that value (method return? > switch result? block result? depends on > where the arrow

Re: Yield as contextual keyword (was: Call for bikeshed -- break replacement in expression switch)

2019-05-17 Thread Guy Steele
I (somewhat reluctantly, but with an appreciation for the pragmatics of the situation) support option B. —Guy > On May 17, 2019, at 12:57 PM, Brian Goetz wrote: > > As was pointed out in Keyword Management for the Java Language > (https://openjdk.java.net/jeps/8223002 >

Yield as contextual keyword (was: Call for bikeshed -- break replacement in expression switch)

2019-05-17 Thread Brian Goetz
As was pointed out in Keyword Management for the Java Language (https://openjdk.java.net/jeps/8223002 ), contextual keywords are a compromise, and their compromises vary by lexical position. Let’s take a more organized look at the costs and options for

Re: Call for bikeshed -- break replacement in expression switch

2019-05-17 Thread Alex Buckley
Correction: `yield-value` is a hyphenated keyword. Specifically, a hyphenated contextual keyword, where each term is itself a unitary contextual keyword. This is discussed, with examples, in the JEP (https://openjdk.java.net/jeps/8223002). Introducing `yield-value` as a hyphenated contextual

Re: Call for bikeshed -- break replacement in expression switch

2019-05-17 Thread Remi Forax
Thanks, Alex, i stand corrected. Rémi - Mail original - > De: "Alex Buckley" > À: "amber-spec-experts" > Envoyé: Vendredi 17 Mai 2019 23:56:14 > Objet: Re: Call for bikeshed -- break replacement in expression switch > Correction: `yield-value` is a hyphenated keyword. Specifically, a