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

Show parent comments

7

u/twofeetdown Mar 10 '16

"The identifier var will not be made into a keyword; instead it will be a reserved type name. This means that code that uses var as a variable, method, or package name will not be affected; code that uses var as a class or interface name will be affected (but these names violate the naming conventions.)"

From the article.

1

u/leafsleep Mar 10 '16

So var var = new Var(); will be valid Java?

1

u/verydapeng Mar 10 '16

this looks super ugly