Re: Unnecessary uses of final on local variables

2019-06-13 Thread Dale Emery
> On Jun 13, 2019, at 4:15 PM, Ryan McMahon wrote: > > I agree with this sentiment, and have generally only been using final on > class fields and method parameters where I want to guarantee immutability > as of late. However, I was at one time adding final to local variables, > and I know tha

Re: Unnecessary uses of final on local variables

2019-06-13 Thread Dale Emery
> On Jun 13, 2019, at 4:29 PM, Juan José Ramos wrote: > > +1 to removing *final* on local variables. > However, regarding Ryan's example, and even if it adds some "noise" to the > source code, I'm in favour of keeping the *final* keyword on local > variables whenever the developer wants to expli

Re: Unnecessary uses of final on local variables

2019-06-13 Thread Juan José Ramos
+1 to removing *final* on local variables. However, regarding Ryan's example, and even if it adds some "noise" to the source code, I'm in favour of keeping the *final* keyword on local variables whenever the developer wants to explicitly show the intent of making that the variable effectively const

[DISCUSS] RFC 0: Lightweight RFC Process

2019-06-13 Thread Alexander Murmann
Hi everyone, I am proposing a new process that is aimed to address some of the issues we've recently encountered in making collective decisions. The process I am proposing would use pull request to discuss proposals. To demonstrate the process, I submitted my proposal as a pull request

Re: Unnecessary uses of final on local variables

2019-06-13 Thread Ryan McMahon
I agree with this sentiment, and have generally only been using final on class fields and method parameters where I want to guarantee immutability as of late. However, I was at one time adding final to local variables, and I know that I have checked in code with final locals. Should we actively b

Unnecessary uses of final on local variables

2019-06-13 Thread Kirk Lund
According to Effective Java 3rd Edition, all local variables are implicitly made final by the JVM (and thus receiving the same JVM optimizations as a final variable) without requiring use of the keyword as long as you only set the value once. So this becomes an unnecessary use of the keyword final