Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!newsfeed.utanet.at!newscore.univie.ac.at!aconews-feed.univie.ac.at!aconews.univie.ac.at!not-for-mail Newsgroups: comp.lang.java.programmer From: Andreas Leitgeb Subject: Re: Style Police (a rant) References: Reply-To: avl@logic.at User-Agent: slrn/pre0.9.9-111 (Linux) Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: Date: 10 Sep 2011 11:40:03 GMT Lines: 16 NNTP-Posting-Host: gamma.logic.tuwien.ac.at X-Trace: 1315654803 tunews.univie.ac.at 71616 128.130.175.3 X-Complaints-To: abuse@tuwien.ac.at Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:7765 Wanja Gayk wrote: > It's a shame that in Java not all references are implicitly final and > only real variables get marked with "var" instead - that would serve the > same purpose with less effort and less visual clutter. It seems like your general coding style differs from mine. The percentage of re-assigned variables versus those assigned only once is large enough, that a "var" keyword would cause more clutter than putting "final" on each other variable. I'd favor a different change: let final variables optionally have their type inferred: final myList = new ArrayList(); Afterall, it is just a handle for some previously obtained value.