Re: Sealed types -- updated proposal

2019-01-17 Thread forax
> 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

Re: Sealed types -- updated proposal

2019-01-17 Thread forax
> 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

break-with

2019-01-17 Thread Brian Goetz
> 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

Re: We need more keywords, captain!

2019-01-17 Thread Guy Steele
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

Re: We need more keywords, captain!

2019-01-17 Thread Remi Forax
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,

Re: Sealed types -- updated proposal

2019-01-17 Thread Remi Forax
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

Re: We need more keywords, captain!

2019-01-17 Thread Tagir Valeev
+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

Re: We need more keywords, captain!

2019-01-17 Thread Remi Forax
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

Re: Hyphenated keywords and switch expressions

2019-01-17 Thread Gavin Bierman
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