<div dir="ltr"><div style="font-family:monospace" class="gmail_default">Hello Brian,<br><br>Thank you for the response. Also, apologies for the multiple branches - sometimes pipermail confuses me.<br><br>> Contextual keywords have been a thing for a long time,<br>> so to some degree, its already no longer “within <br>> reach.”  But I don’t think we should worry too much <br>> about a flood; each feature is carefully considered <br>> and we try to balance all the competing concerns.<br><br>Of course, but the number and scale of them have been ramping up sharply lately. I agree that every decision made regarding contextual keywords was well reasoned and thought through, I am only trying to raise the point that the effort to carry this is getting heavier at a faster rate for parsing folks.<br><br>> We agree that we should use them with care. I think<br>> where we disagree is the weights we assign in the<br>> balancing of the tradeoffs.<br><br>That makes sense. I think I understand the perspective that you are coming from now - simplifying the developer experience by maximizing readability and expressiveness while avoiding unnecessary verbosity or contradiction of the user's existing mental model. For context, I am coming from the perspective of making language analysis tools for the language as easy to make and performant as possible. I also teach new developers how to code in Java, and one of the consistent pain points has been learning when and where a context dependent keyword is allowed. Both of these points are what motivated me to make my original post.<br><br>> double-checking-that <br><br>This is a very helpful example. It sounds like you are saying it is the wrong choice because it throws away the established mental model to create a new meaning. (double as a number, versus double as in the phrase double-checking)<br><br>To make sure that I understand it though, another example would be something like this?<br><br>case Integer x while x > 0<br><br>Right? That would "check all the boxes", but would involve users throwing away the definition to make room for another one. (while as in while LOOP, versus while as in the english word to imply 2 things being true simultaneously)<br><br>It also sounds like not only do we want something that checks all the boxes, but almost reads like a sentence too. Understanding that, it helps me see why "when" is a good fit.<br><br>> We aim for decisions that, ten years from now, don’t<br>> stand out. (We often struggle with Stroustrup’s rule<br>> here too.)<br><br>I never knew about Stroustrup's Rule, thank you. Here it is for those who are also just learning it.<br><br>- For new features, people insist on LOUD explicit syntax.<br>- For established features, people want terse notation.<br><br>With the point being, what is explicit and helpful today becomes noisy and verbose tomorrow. We should prioritize terse now, and then it will feel natural later.<br><br>This makes a lot of sense. And in that case, I see why my suggestions mostly don't meet the needs. There needs to be a delicate balance between terse and expressive here.<br><br>> (In regards to using "if")<br>> This one was discussed at some length and was<br>> rejected with prejudice :)<br><br>I'll do some research and see if that one isn't lost to the sands of time as well. If anyone has a link or a rough sense of timing, that would also be helpful.<br><br>Alternatively, if anyone remembers the reason, I would love to know why. I can pretty well guess, but want to confirm.<br><br>> (In regards to using "only-if")<br>> I will admit the last one “isn’t terrible”,<br>> though it definitely STANDS OUT (see <br>> Stroustrup’s Rule) and I suspect the <br>> ten-year test will prefer “when” pretty <br>> strongly.<br><br>After reading all of this, I can see how it might stand out. And looking at the above points again, I also see why "only-if" is the best contender of my suggestions.<br><br>- Doesn't deviate too far from an existing mental model<br>- Is somewhat terse<br>- Reads like a sentence<br><br>I still stand behind "only-if". That said, I definitely concede that, from the everyday Java developer's perspective, "when" is the superior choice.<br><br>All the same, as the language inevitably grows and branches out into new territory/use-cases, the need for stronger static analysis tools grows with it. I'd like to avoid stepping in the way of that any more than necessary. And
I think the benefits gained are worth 2 more characters and a hyphen. 

</div><div style="font-family:monospace" class="gmail_default"><br></div><div style="font-family:monospace" class="gmail_default">Thank you for your time and insight!</div><div style="font-family:monospace" class="gmail_default">David Alayachew</div><br></div>