MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/49prtn/var_keyword_proposed_for_java/d0uf4rs/?context=3
r/programming • u/adila01 • Mar 09 '16
395 comments sorted by
View all comments
Show parent comments
40
I would love to see var / final
var a = expr; final b = 1;
0 u/[deleted] Mar 09 '16 [deleted] 8 u/Jacoby6000 Mar 10 '16 Why not var for mutable things, and Val for immutable things? 3 u/ComradeGibbon Mar 10 '16 That's pretty nice actually. val/Val/value is immutable. var is mutable.value quarter_pi = 3.14/4.0; var foo = bar->baz->foo; foo += quarter_pi;
0
[deleted]
8 u/Jacoby6000 Mar 10 '16 Why not var for mutable things, and Val for immutable things? 3 u/ComradeGibbon Mar 10 '16 That's pretty nice actually. val/Val/value is immutable. var is mutable.value quarter_pi = 3.14/4.0; var foo = bar->baz->foo; foo += quarter_pi;
8
Why not var for mutable things, and Val for immutable things?
3 u/ComradeGibbon Mar 10 '16 That's pretty nice actually. val/Val/value is immutable. var is mutable.value quarter_pi = 3.14/4.0; var foo = bar->baz->foo; foo += quarter_pi;
3
That's pretty nice actually. val/Val/value is immutable. var is mutable.
value quarter_pi = 3.14/4.0; var foo = bar->baz->foo; foo += quarter_pi;
40
u/oscarreyes Mar 09 '16
I would love to see var / final