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

15

u/RobIII Mar 10 '16

I wish C# have final or something equivalent for local variables.

Watch this one: Proposal: 'readonly' for Locals and Parameters

1

u/mirhagk Mar 10 '16

It's likely to make it into C# 7 as well, it was highly desired for C# 6.

1

u/MacASM Mar 10 '16

This isn't going to change unless they change CLR spec too. That's why there's no readonly for locals.

9

u/ummmyeahright Mar 10 '16

No. The comments about CLR change requirement are about other features suggested in comments (also not actually necessary for 99.9% of cases, just more convenient to implement them that way).

Readonly locals don't 'require' any change to the CLR.