> De: "Brian Goetz"
> À: "Remi Forax"
> Cc: "amber-spec-experts"
> Envoyé: Jeudi 17 Janvier 2019 19:20:05
> Objet: Re: Sealed types -- updated proposal
>> Given that the proposal introduce the notion of sealed types, "sealed" is a
>> better keyword.
> Note that `sealed` already has a meaning
> De: "Brian Goetz"
> À: "Remi Forax"
> Cc: "amber-spec-experts"
> Envoyé: Jeudi 17 Janvier 2019 19:03:21
> Objet: Re: Sealed types -- updated proposal
>>> Contextual keywords are usually OK as modifiers (as long as they don’t want
>>> to
>>> show up somewhere else), so `sealed` is not
> Being able to call this something like `break-with v` (or some other derived
> keyword) would have made this all a lot simpler. (BTW, we can still do this,
> since expression-switch is still in preview.)
It seems we’re all in favor of break-with over unadorned “break”?
Which feeds into the
I am persuaded by your argument. I thought we should consider break-return, but
I am now convinced that overall break-with is the better choice.
—Guy
Sent from my iPhone
> On Jan 17, 2019, at 9:45 AM, Remi Forax wrote:
>
> I think i prefer break-with,
> the problem of break-return is that
My favorite hyphen keyword is short-circuit, i don't know where to use it, but
it's so good that we have to find a new feature to introduce it :)
As i said, i really like this proposal.
The hyphen keywords nicely solve the issue when you want to introduce a keyword
in the middle of the code,
I'm still not 100% sure that mixing the exhaustiveness and the closeness is a
good idea,
again because
- you may want closeness of non user named types
- you may want exhaustiveness not only types (on values by example)
but it makes the feature simple, so let's go that way.
Allowing public
+1 to break-with
With best regards,
Tagir Valeev
чт, 17 янв. 2019 г., 16:46 Remi Forax fo...@univ-mlv.fr:
> I think i prefer break-with,
> the problem of break-return is that people will write it break return
> without the hyphen, break return is in my opinion too close to return if
> you read
I think i prefer break-with,
the problem of break-return is that people will write it break return without
the hyphen, break return is in my opinion too close to return if you read the
code too fast and a break return without a value means nothing unlike a regular
return.
I like break-with
Thank you Alex and Tagir. I have uploaded a new version of the spec at:
http://cr.openjdk.java.net/~gbierman/switch-expressions.html
This contains all the changes you suggested below. In addition, there is a
small bug fix in 5.6.3 concerning widening