Neal Gafter: A parenthesized expression can now contain additional statements, for example declarations of temporary local variables to avoid recomputing a value used only within the expression. This feature is especially useful in machine-generated code.
A simple example:
double pi2 = (double pi = Math.PI ; pi*pi);
This is comparable to the equivalent JavaFX Script:
var pi2 = {var pi = Math.PI; pi*pi};
The proposal sounds like it should be eligible for Project Coin.
But will the Java community accept language proposals from a Microsoft employee (where Neal now works.)?
Oh, wait. Java did it once already: auto-boxing, annotations, and enums.