really the immutable reference should be the shortest one to type so that it's default. too late for java, of course. this is something i think rust got right. let vs mut let.
Java is not a functional programming language; making immutability the default here, but not everywhere else, would be a jarring inconsistency.
(And imagine 10 years later when they've added a bunch more features, and you have to remember which half of the language features immutability by default, and which half features mutability by default.)
I don't see why being a functional programming language would be a requirement for making variables immutable by default. Well over 70% of the variables I use are never changed – it would be nice if I could get this guaranteed by the compiler.
40
u/oscarreyes Mar 09 '16
I would love to see var / final