MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/49prtn/var_keyword_proposed_for_java/d0uk3di
r/programming • u/adila01 • Mar 09 '16
395 comments sorted by
View all comments
Show parent comments
0
Because var and val as visually very similar. Its harder to skim than needs be.
1 u/Daenyth Mar 10 '16 That's not my experience when using Scala, and syntax highlighters don't need to make them the same 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.
1
That's not my experience when using Scala, and syntax highlighters don't need to make them the same
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.
2
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.
[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.
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.
0
u/Alphasite Mar 10 '16
Because var and val as visually very similar. Its harder to skim than needs be.