Local Variable Type Inference - prototype

Maurizio Cimadamore maurizio.cimadamore at oracle.com
Thu Mar 10 14:48:25 UTC 2016


Hi,
I've pushed the first iteration of the local variable type inference 
prototype in the sandbox repository[1]. For those willing and brave 
enough to experiment, the branch name is "JEP-286-branch". We are also 
working to get some ready-made binary snapshots out of the door and hope 
to have an update on that soon.

This first iteration supports the 'var-only' syntax style:

var s = "Hello!";

That is, the type of 's' is inferred from the initializer, and no 
special assumption is made about mutability.

Please share your experience with the prototype. For comments on this 
feature please refer to the survey[2] that Brian posted few days ago.

Maurizio

[1] - http://cr.openjdk.java.net/~chegar/docs/sandbox.html
[2] - 
http://mail.openjdk.java.net/pipermail/platform-jep-discuss/2016-March/000037.html


More information about the platform-jep-discuss mailing list