logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Gregory <garydgreg...@gmail.com>
Subject Re: r1501104
Date Wed, 10 Jul 2013 02:01:00 GMT
On Tue, Jul 9, 2013 at 7:41 PM, Nick Williams <nicholas@nicholaswilliams.net
> wrote:

> Gary,
>
> Earlier today you committed r1501104 with the following comment:
>
> > Add final modifier to private fields.
> > Add final modifier to method parameters.
> > Add final modifier to local variables.
>
> I've seen you do similar things before, too. Can you explain a little bit
> why you do this? There's certainly no compiler value--the compiler for a
> long time has been capable of determining whether a variable is ever
> changed and optimizing appropriately. All it seems to do to me is clutter
> the code...significantly. It makes the code harder to read, IMO.
>
> Can you justify the intentional mass change of this nature?
>

I've explained it so many time to different people over the years that I
had to write it down :)

Please read
https://garygregory.wordpress.com/2013/01/26/the-final-kiss-in-java/

Gary


>
> Thanks,
>
> Nick
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-dev-help@logging.apache.org
>
>


-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
Java Persistence with Hibernate, Second Edition<http://www.manning.com/bauer3/>
JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
Spring Batch in Action <http://www.manning.com/templier/>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Mime
View raw message