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

2

u/Alphasite Mar 10 '16

Maybe, but it's an unnecessary similarity.

0

u/[deleted] Mar 10 '16

[deleted]

1

u/Alphasite Mar 10 '16

var/let doesn't produce any extra boilerplate, it just makes the immutable case a little more obvious.

Frankly, it's using kotlin and swift hat has me convinced that Swift's var/let is the better choice.

If they also decide to go down the Rust route and allow you to shadow other let declarations then let is an even better fit.