2011/6/13 Fabrizio Giudici <fabrizio.giud...@tidalwave.it> > On 06/13/2011 07:58 PM, Cédric Beust ♔ wrote: > > On Mon, Jun 13, 2011 at 10:49 AM, Kevin Wright > <kev.lee.wri...@gmail.com<mailto: >> kev.lee.wri...@gmail.com>> wrote: >> >> I'd be very curious to know exactly how consistent you are with >> marking even your method arguments as final, it's just oh-so-easy >> to leave out because it clutters up the code... >> >> >> I hardly ever use final in my code, because the kind of immutability it >> enforces is not very useful in practice. >> >> >> For what concerns me, I declare final everything that I can. There must > be less than five non final method arguments in several hundred thousands > lines of code. >
To each their own, I guess. My argument is that I can hardly remember last time I was bitten by a bug because I reassigned a variable wrongly (or even, I reassigned a variable, period). In contrast, the noise introduced by using `final` everywhere is as annoying to me as Python saying `self` every other word, so overall, the trade-off is not worth it. -- Cédric -- You received this message because you are subscribed to the Google Groups "The Java Posse" group. To post to this group, send email to javaposse@googlegroups.com. To unsubscribe from this group, send email to javaposse+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/javaposse?hl=en.