You said it all. +100 On Mar 9, 2018, at 2:15 PM, Brian Goetz <brian.go...@oracle.com> wrote: > > I understand where these people are coming from. But my experience is, with > a platform as mature as Java, one must be very, very careful of the desire to > opportunistically "fix" "mistakes" of the past, it can be a siren song that > draws you to the rocks. I am skeptical… > ...
> Pesonally, I think if we're going to stick with switch, the current proposal > -- which generalizes the existing switch semantics -- is staying more true to > what switch is. If we find we have to abandon switch and do something else, > then I think many more options are on the table. I'll add that switch has accommodated all of our upgrades surprisingly well, to the point that I am very hopeful we don't have to pay the very costs of a totally new construct. The major cost, IMO, would be confusing the language by providing two complex but incompatible constructs with strongly overlapping functionality. I'd very much rather add new constructs because the language can't really express something type-safely, or because there is a 30x gain in compactness for some common construct. Then the overlap issue doesn't appear. — John