Expression switch - an alternate proposal

Brian Goetz brian.goetz at oracle.com
Fri Apr 13 12:10:13 UTC 2018


> It is quite different from the equivalent transformation with lambda 
> expressions: 

I think it's not nearly as different as you think; I think it's just new 
and different, and different is scary.

People, this happens with every new language feature we do.  We tend to 
hold new features to a different standard that we do existing features 
-- often an impossible one.  We see a confusing idiom, and we go all 
"OMG a puzzler the sky is falling, you can't do that."  Or we imagine a 
way in which a feature might be misused, and go all "OMG bad programmers 
might write bad code, disaster."

This sort of "I worry they're going to break Java this time" anxiety is 
natural -- we are all deeply invested in it -- but expressing it in this 
forum and form is usually counterproductive.  I think this thread is 
past a casual "I'm concerned" to where you're making assumptions about 
things, and then leaping from those assumptions to OMG the sky is falling.

Let me remind people what this list is for.  This is the amber-DEV list, 
not the amber-bikeshed list.  Want to contribute to the implementation?  
Great, jump in.  Want to take the prototype for a test drive, and report 
back your experiences?  Yes please!  Got questions about "how will it 
work?"   OK, but be reasonable (these things can easily get 
overwhelming, and then we make no forward progress), and let's try to 
keep it from devolving into "I would do it differently" tirades.  Want 
to have a long back-and-forth design discussion?  No, this is not the 
place for it.

The primary purpose of this list is twofold:
  - For implementors to collaborate;
  - For people to tell us things about the feature that we _don't 
already know_.

Secondarily, its a good place for us to provide additional background on 
how things work, how we think about these features, etc, so that it can 
be disseminated.

But, we've strayed pretty far from that here.  So, everybody take a breath.

Cay, there's an implementation.  It's not 100% up-to-date, and the spec 
isn't even finished, but going forward, please:
  - Compile your examples before posting.
  - If you find something that doesn't work as you'd expect, first ask 
whether that's definitely how its going to work before getting too 
worked up.

Thanks everyone.




More information about the amber-dev mailing list