New candidate JEP: 361: Switch Expressions (Standard)

Brian Goetz brian.goetz at
Sat Sep 28 01:48:37 UTC 2019

On 9/27/2019 6:54 PM, JARvis PROgrammer wrote:
> Thanks for your response!
> I've thought that ranges in current form might be just part of JEP361 
> as part of new switches' syntax (in the way coma-separated values in 
> them do) without any meaning in any other context, yet with 
> /chance/ for this syntax to be used in the future in other ways. 
> Especially, considering the fact that the chances that any other (if 
> they ever happen to come into Java) meaning of such literals will be 
> inapplicable in case of switch-case statements (I mean, even if 
> they'll once be used for something like var subArray = array[1..3], 
> this won't still be a reason for ambiguity in the place where they are 
> currently suggested to be used).

I understand the optimism that this could just be "slipped in" for 
switches and later expanded to other contexts.  But, as I mentioned, 
even a small feature like this is bigger than it looks.

> Anyway, are there any planned possible discussions about ranges (in 
> the way you've described their possiblle semantics) in the upcoming 
> future? I'd be happy to take part in those :)

It's in the category of "credible features we might do someday" -- which 
is a very long list -- but not much more than that.  The features we're 
working on now have been selected because they offer a more positive 
cost/benefit, so we're going to do them first, but maybe we'll come back 
and look at it again someday.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the amber-spec-experts mailing list