NNTP-Posting-Date: Sun, 07 Apr 2013 02:55:08 -0500 Date: Sun, 07 Apr 2013 08:55:07 +0100 From: lipska the kat <"nospam at neversurrender dot co dot uk"> Organization: Trollbusters 3 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130308 Thunderbird/17.0.4 MIME-Version: 1.0 Newsgroups: comp.lang.java.programmer Subject: Re: Inserting In a List References: <19un43xj77bua.vw45l4e2wshi.dlg@40tude.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Message-ID: Lines: 38 X-Usenet-Provider: http://www.giganews.com X-AuthenticatedUsername: NoAuthUser X-Trace: sv3-k8lMN3taJ9+nP1B4wTz//dAsaoBv+XX9zszXSM0TdtyqVADMwCkK5YhNvKX57nA/0zsCaRM8FiA05M3!tnQ5ETK1QjIajw8tCI5N2TkFUK2Y9miNad4pIlHqa0XuSgldTiwebh1XYDJ4sR0sg0666bhcqPk= X-Complaints-To: abuse@btinternet.com X-DMCA-Complaints-To: abuse@btinternet.com X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 2684 Path: csiph.com!usenet.pasdenom.info!news.stben.net!border3.nntp.ams.giganews.com!Xl.tags.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!local2.nntp.ams.giganews.com!nntp.bt.com!news.bt.com.POSTED!not-for-mail Xref: csiph.com comp.lang.java.programmer:23360 On 06/04/13 20:39, Wanja Gayk wrote: > In article , lipska the kat > (lipska the kat) says... > >> Just as a matter of interest what's with all the finals >> >> particularly >> >> for (final File name : folder.listFiles()) >> >> Despite initial appearances this is indeed legal as the >> assignment is made multiple times but from the same statement. >> >> Given that the final keyword is, aside from a flag to the compiler for >> possible optimization, largely documentary, what is the point of making >> name final. >> >> In fact what does peppering the code with finals do to make it easily >> understandable to an inexperienced developer ? > > In my opinion it's been an unfortunate decision to have a "final" > keyword instead of a "var" keyword with a "final" default. > > Now, I'm a fan of using the "final" keyword everywhere possible apart > from method and class declarations and I'll give you my reasons behind > it. Your arguments are fair and represent your view of things. This is fine, however I have a question for you. Without getting all *philosophical* about it, what do you think the point of a variable is? lipska -- Lipska the KatŠ: Troll hunter, sandbox destroyer and farscape dreamer of Aeryn Sun