IMHO _final_ should never be used on local variables unless you need them, e.g. because you pass the variable to an anonymous class aka closure aka lambda expression. Simply because it pollutes the code for an optimization that's AFAIK also done by the HotSpot. On parameters it's a matter of taste. But on instance or static members it's a matter of design: do I want to seal make this constant or not? That leads to a discussion of what classes should be extensible, what's public API and so on.
On Wed, Oct 16, 2013 at 5:24 PM, Marcin Miłkowski <list-addr...@wp.pl> wrote: > Hi Daniel, > > frankly, I don't see a problem with reading code interspersed with "final", > so removing them does not seem to be useful in anything for me. > > Regards, > Marcin > > > 2013/10/16 Daniel Naber <list2...@danielnaber.de> >> >> Hi, >> >> quite some time ago, I started a "code style" guide on the Wiki, but we >> never officially accepted it. Also, there are now some new developers, >> so please have a look at the guide and let me know if you agree or if >> you think something is missing: >> >> http://wiki.languagetool.org/code-style >> >> I still think that using the 'final' keyword everywhere messes up the >> code. I *do* think that variables should be final as often as possible, >> but using the keyword often only make the code more complex to read. Can >> we agree that at least in cases like the following the 'final' does not >> need to be used? >> >> catch (final Exception e) >> for (final String word: sentenceTokens) >> >> Regards >> Daniel >> >> -- >> http://www.danielnaber.de >> >> >> >> ------------------------------------------------------------------------------ >> October Webinars: Code for Performance >> Free Intel webinars can help you accelerate application performance. >> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most >> from >> the latest Intel processors and coprocessors. See abstracts and register > >> >> http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk >> _______________________________________________ >> Languagetool-devel mailing list >> Languagetool-devel@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/languagetool-devel >> > > > ------------------------------------------------------------------------------ > October Webinars: Code for Performance > Free Intel webinars can help you accelerate application performance. > Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most > from > the latest Intel processors and coprocessors. See abstracts and register > > http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk > _______________________________________________ > Languagetool-devel mailing list > Languagetool-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/languagetool-devel > ------------------------------------------------------------------------------ October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk _______________________________________________ Languagetool-devel mailing list Languagetool-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/languagetool-devel