On Tue, Jul 9, 2013 at 7:41 PM, Nick Williams <[email protected] > 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: [email protected] > For additional commands, e-mail: [email protected] > > -- E-Mail: [email protected] | [email protected] 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
