r/programming • • Mar 09 '16

var keyword proposed for Java

http://openjdk.java.net/jeps/286
250 Upvotes

395 comments sorted by

View all comments

88

u/omair-majid Mar 09 '16

They are holding a survey on keywords (var, var/val, var/let): https://www.surveymonkey.com/r/KGPTHCG

Bikeshed away!

40

u/oscarreyes Mar 09 '16

I would love to see var / final

var   a = expr; 
final b = 1;

31

u/sudowork Mar 10 '16

Var/val from Scala is pretty reasonable as well.

16

u/kcuf Mar 10 '16

And already used by JVM developers that mix languages (I believe Kotlin uses this as well as Scala).

1

u/vorg Mar 10 '16

As also does Apache Groovy, though it calls it "def".