Re: Flow scoping

2019-01-08 Thread John Rose
I'm actually OK with the more concise and obscure notation, but I think we need to note carefully where writability readability trades off against readability, so we can tilt the language toward readability. On Jan 8, 2019, at 4:07 PM, Remi Forax wrote: > > While the aim is perhaps noble, make

Re: Flow scoping

2019-01-08 Thread John Rose
On Jan 8, 2019, at 5:15 PM, John Rose wrote: > > I'm actually OK with the more concise and obscure notation, but I think > we need to note carefully where writability readability trades off against > readability, so we can tilt the language toward readability. Paste error! Delete the first of

Re: Flow scoping

2019-01-08 Thread Remi Forax
> De: "John Rose" > À: "Tagir Valeev" > Cc: "amber-spec-experts" > Envoyé: Mardi 8 Janvier 2019 23:55:19 > Objet: Re: Flow scoping > On Jan 4, 2019, at 6:07 AM, Tagir Valeev < [ mailto:amae...@gmail.com | > amae...@gmail.com ] > wrote: >> For the record: I heavily support this. If then-branch

Re: Flow scoping

2019-01-08 Thread John Rose
On Jan 8, 2019, at 3:14 PM, Brian Goetz wrote: > > Essentially, you're saying that if someone declares a pattern variable that > would shadow a DU (final, please!) local, then the variables are merged and > the scope is pinned at the scope of the local. That's nice in that the scope > and

Re: Flow scoping

2019-01-08 Thread Brian Goetz
Essentially, you're saying that if someone declares a pattern variable that would shadow a DU (final, please!) local, then the variables are merged and the scope is pinned at the scope of the local.  That's nice in that the scope and declaration point are now clearer, but on the other hand the

Re: Flow scoping

2019-01-08 Thread John Rose
On Jan 4, 2019, at 6:07 AM, Tagir Valeev wrote: > > For the record: I heavily support this. If then-branch cannot complete > normally, then unwrapping the else-branch should preserve the program > semantics. It works today, and it should work in future Java as well. I agree also. But it is

Re: Sealed types

2019-01-08 Thread Brian Goetz
Or, if not additive, but we end up reusing the `final` keyword in the way shown at the bottom of this email, then we could at least allow `permits //, TypeA, TypeB` which is maybe nearly as good. In light of this morning's observation about hyphenated keywords ... there's a lot in this

Re: We need more keywords, captain!

2019-01-08 Thread Guy Steele
Actually, even better than `break-with` would be `break-return`. It’s clearly a kind of `break`, and also clearly a kind of `return`. I think maybe this application alone has won me over to the idea of hyphenated keywords. (Then again, for this specific application we don’t even need the

We need more keywords, captain!

2019-01-08 Thread Brian Goetz
This document proposes a possible move that will buy us some breathing room in the perpetual problem where the keyword-management tail wags the programming-model dog. ## We need more keywords, captain! Java has a fixed set of _keywords_ (JLS 3.9) which are not allowed to be used as