Call for bikeshed -- break replacement in expression switch

Remi Forax forax at
Fri May 17 15:40:46 UTC 2019

Hi Manoj,
yield-value is not a hyphenated keyword, the left part of the right part as to be an existing keyword. 


On May 17, 2019 2:55:14 PM UTC, Manoj Palat <manoj.palat at> wrote:
>I have a few points regarding this – since there was a flurry of mails
>night/day, I have given references below to specific threads below:
>-As Maurizio pointed out in
>, “yield” is not really a _reserved_type_identifier_ like “var” – “var”
>correct only at places (at some places actually) where a type can
>	Our view point: At parsing time “var” is just taken as a type and
>hence from a compiler implementation point of view, “var” is less of a
>challenge than the proposed “yield”. If “yield” value is used instead
>“break” value, then again, the compiler needs to disambiguate – the
>disambiguation problem just manifests in a different avatar.
>-Alex, in the discussion here
>has pointed out that “The parsing of a `(` token has triggered
>unbounded lookahead for some time [1][2], and everything worked out, so
>don't see why the language should disallow any of John's examples”
>The reference [1] is “[1] See slides 9-11 from
>>	Our View point: However, though the problem was resolved finally
>for lambda, additions of new context sensitive keywords would make our
>parsing more complicated with additional logic in lookaheads. Although
>problem was solved from a pure compiler perspective, we are far from
>winning the battle as an IDE where one major value add is code
>which works on incomplete code. Due to these hacks, code completion for
>lambdas still has unresolved issues for us.
>- An additional input to this discussion is the proposal for hyphenated
>keywords as described in
>“break-with” which was the earlier proposed one, was one among these
>hyphenated keywords.
>Our View point: We are fine with that as mentioned in the mailing list
>sometime earlier in the context of switch expressions and break-with,
>hyphenated keyword. The more the number of context sensitive keywords
>introduced, causing more hacks, it would be really difficult to sustain
>scale the Eclipse IDE.
>- Based on the above, I believe “break-with” was a better candidate
>less or disambiguation and it goes along with the future direction of
>keywords. Here the assumption is break-with is not context sensitive at
>point in time. Given that “break-with” had opposition, and “yield” was
>popular candidate, planning to reply with a new suggestion of
>keyword “yield-value” or any other hyphenated keyword.
>Eclipse Java Dev.
>From:	Remi Forax <forax at>
>To:	John Rose <john.r.rose at>
>Cc:	amber-spec-experts <amber-spec-experts at>
>Date:	05/17/2019 01:00 PM
>Subject:	[EXTERNAL] Re: Call for bikeshed -- break replacement in
>            expression switch
>Sent by:	"amber-spec-experts"
>            <amber-spec-experts-bounces at>
>----- Mail original -----
>> De: "John Rose" <john.r.rose at>
>> À: "Brian Goetz" <brian.goetz at>
>> Cc: "amber-spec-experts" <amber-spec-experts at>
>> Envoyé: Vendredi 17 Mai 2019 08:41:20
>> Objet: Re: Call for bikeshed -- break replacement in expression
>> (Going back to the start of this thread.)
>> On May 12, 2019, at 12:38 PM, Brian Goetz <brian.goetz at>
>>> We could surely take “break-with” and move on; it feels sufficiently
>> If "break L" breaks out of a statement introduced with "L"…
>> Then…
>> "break ->" could break out of a statement introduced with "->".
>It's not logical for me, it's not "L", it's "L:".
>If it was "break :L", i would agree.

Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.

More information about the amber-spec-observers mailing list