<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.3.2" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments on: All variables in Java must be final</title>
	<link>http://stephan.reposita.org/archives/2008/04/22/all-variables-in-java-must-be-final/</link>
	<description>Productivity in software development</description>
	<pubDate>Sun, 12 Oct 2008 17:30:05 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.2</generator>
		<item>
		<title>By: BA</title>
		<link>http://stephan.reposita.org/archives/2008/04/22/all-variables-in-java-must-be-final/#comment-83472</link>
		<dc:creator>BA</dc:creator>
		<pubDate>Fri, 02 May 2008 13:14:47 +0000</pubDate>
		<guid>http://stephan.reposita.org/archives/2008/04/22/all-variables-in-java-must-be-final/#comment-83472</guid>
		<description>"It’s the right thing to do, especially in relatively long methods."

Can you elaborate on the right thing? Why? And, it's usually considered bad practice to have long methods so that's not really a good point, is it?</description>
		<content:encoded><![CDATA[<p>&#8220;It’s the right thing to do, especially in relatively long methods.&#8221;</p>
<p>Can you elaborate on the right thing? Why? And, it&#8217;s usually considered bad practice to have long methods so that&#8217;s not really a good point, is it?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sipowitz</title>
		<link>http://stephan.reposita.org/archives/2008/04/22/all-variables-in-java-must-be-final/#comment-83406</link>
		<dc:creator>Sipowitz</dc:creator>
		<pubDate>Fri, 02 May 2008 10:03:12 +0000</pubDate>
		<guid>http://stephan.reposita.org/archives/2008/04/22/all-variables-in-java-must-be-final/#comment-83406</guid>
		<description>I adopted the habit of making all variables final about a year ago, and I don't regret it. It's the right thing to do, especially in relatively long methods.</description>
		<content:encoded><![CDATA[<p>I adopted the habit of making all variables final about a year ago, and I don&#8217;t regret it. It&#8217;s the right thing to do, especially in relatively long methods.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peter lawrey</title>
		<link>http://stephan.reposita.org/archives/2008/04/22/all-variables-in-java-must-be-final/#comment-82290</link>
		<dc:creator>peter lawrey</dc:creator>
		<pubDate>Wed, 30 Apr 2008 05:59:13 +0000</pubDate>
		<guid>http://stephan.reposita.org/archives/2008/04/22/all-variables-in-java-must-be-final/#comment-82290</guid>
		<description>"The semantics are the same for the caller of your method whether you make them final or not. "
Good point. I would agree that final parameters for a method make no difference to the caller.  So making them final by default would have no impact in that situation either.</description>
		<content:encoded><![CDATA[<p>&#8220;The semantics are the same for the caller of your method whether you make them final or not. &#8221;<br />
Good point. I would agree that final parameters for a method make no difference to the caller.  So making them final by default would have no impact in that situation either.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stephan</title>
		<link>http://stephan.reposita.org/archives/2008/04/22/all-variables-in-java-must-be-final/#comment-82267</link>
		<dc:creator>stephan</dc:creator>
		<pubDate>Wed, 30 Apr 2008 04:49:14 +0000</pubDate>
		<guid>http://stephan.reposita.org/archives/2008/04/22/all-variables-in-java-must-be-final/#comment-82267</guid>
		<description>@hacklberry: As I've written lots of Ruby, Perl, Python, C, Delphi and some Groovy in the past 15 years, shouldn't it be that &lt;i&gt;"the most common charactersitic of Ruby, Perl, Python, C, Delphi, Groovy and Java developers is their ignorance"&lt;/i&gt; ? :-)</description>
		<content:encoded><![CDATA[<p>@hacklberry: As I&#8217;ve written lots of Ruby, Perl, Python, C, Delphi and some Groovy in the past 15 years, shouldn&#8217;t it be that <i>&#8220;the most common charactersitic of Ruby, Perl, Python, C, Delphi, Groovy and Java developers is their ignorance&#8221;</i> ? :-)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: hacklberry</title>
		<link>http://stephan.reposita.org/archives/2008/04/22/all-variables-in-java-must-be-final/#comment-82172</link>
		<dc:creator>hacklberry</dc:creator>
		<pubDate>Wed, 30 Apr 2008 00:43:26 +0000</pubDate>
		<guid>http://stephan.reposita.org/archives/2008/04/22/all-variables-in-java-must-be-final/#comment-82172</guid>
		<description>"I haven’t been using the final keyword in Java for 10 years..." - that is sad, was someone stopping you from reading (freely available) books? :-)  http://www.parashift.com/c  -faq-lite/const-correctness.html ,and Bruce Eckel wrote about const correctness in Java in his "Thinking in Java". Why do I always feel that the most common 
 characteristic of java developers is their ignorance? :-)</description>
		<content:encoded><![CDATA[<p>&#8220;I haven’t been using the final keyword in Java for 10 years&#8230;&#8221; - that is sad, was someone stopping you from reading (freely available) books? :-)  <a href="http://www.parashift.com/c" rel="nofollow">http://www.parashift.com/c</a>  -faq-lite/const-correctness.html ,and Bruce Eckel wrote about const correctness in Java in his &#8220;Thinking in Java&#8221;. Why do I always feel that the most common<br />
 characteristic of java developers is their ignorance? :-)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gabriel Belingueres</title>
		<link>http://stephan.reposita.org/archives/2008/04/22/all-variables-in-java-must-be-final/#comment-82129</link>
		<dc:creator>Gabriel Belingueres</dc:creator>
		<pubDate>Tue, 29 Apr 2008 23:08:36 +0000</pubDate>
		<guid>http://stephan.reposita.org/archives/2008/04/22/all-variables-in-java-must-be-final/#comment-82129</guid>
		<description>I always use the final keyword in my code.

At first it seems that writing final everywhere will clutter the code, but I found it the opposite: When I define a non final variable, I KNOW for sure it will be assigned more than one time (this saves time too.)

Consider also the tricky relationship between final and method overriding, as I discussed here:

http://groups.google.com.ar/group/comp.lang.java.programmer/browse_thread/thread/ef31c6c22307d11b/22bc937b17d51703

Gabriel</description>
		<content:encoded><![CDATA[<p>I always use the final keyword in my code.</p>
<p>At first it seems that writing final everywhere will clutter the code, but I found it the opposite: When I define a non final variable, I KNOW for sure it will be assigned more than one time (this saves time too.)</p>
<p>Consider also the tricky relationship between final and method overriding, as I discussed here:</p>
<p><a href="http://groups.google.com.ar/group/comp.lang.java.programmer/browse_thread/thread/ef31c6c22307d11b/22bc937b17d51703" rel="nofollow">http://groups.google.com.ar/group/comp.lang.java.programmer/browse_thread/thread/ef31c6c22307d11b/22bc937b17d51703</a></p>
<p>Gabriel</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stephan</title>
		<link>http://stephan.reposita.org/archives/2008/04/22/all-variables-in-java-must-be-final/#comment-81995</link>
		<dc:creator>stephan</dc:creator>
		<pubDate>Tue, 29 Apr 2008 20:47:57 +0000</pubDate>
		<guid>http://stephan.reposita.org/archives/2008/04/22/all-variables-in-java-must-be-final/#comment-81995</guid>
		<description>"Anyway, I have found what works for me and what works for a team of diverse individuals are not the same.  In a team I tend to prefer defensive approaches which minimize assumptions."

Same for me.</description>
		<content:encoded><![CDATA[<p>&#8220;Anyway, I have found what works for me and what works for a team of diverse individuals are not the same.  In a team I tend to prefer defensive approaches which minimize assumptions.&#8221;</p>
<p>Same for me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peter lawrey</title>
		<link>http://stephan.reposita.org/archives/2008/04/22/all-variables-in-java-must-be-final/#comment-81952</link>
		<dc:creator>peter lawrey</dc:creator>
		<pubDate>Tue, 29 Apr 2008 19:54:23 +0000</pubDate>
		<guid>http://stephan.reposita.org/archives/2008/04/22/all-variables-in-java-must-be-final/#comment-81952</guid>
		<description>BTW: I was in an interview recently when they were discussing a language they had invented in house. !! While it had some pluses I could see, I was a bit shocked when they said the libraries had 30 million lines of code.

I have developed a small framework which is just over 30K lines and in a recent rewrite I got rid of 10K...

Anyway, I have found what works for me and what works for a team of diverse individuals are not the same.  In a team I tend to prefer defensive approaches which minimize assumptions.</description>
		<content:encoded><![CDATA[<p>BTW: I was in an interview recently when they were discussing a language they had invented in house. !! While it had some pluses I could see, I was a bit shocked when they said the libraries had 30 million lines of code.</p>
<p>I have developed a small framework which is just over 30K lines and in a recent rewrite I got rid of 10K&#8230;</p>
<p>Anyway, I have found what works for me and what works for a team of diverse individuals are not the same.  In a team I tend to prefer defensive approaches which minimize assumptions.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: BA</title>
		<link>http://stephan.reposita.org/archives/2008/04/22/all-variables-in-java-must-be-final/#comment-81945</link>
		<dc:creator>BA</dc:creator>
		<pubDate>Tue, 29 Apr 2008 19:03:28 +0000</pubDate>
		<guid>http://stephan.reposita.org/archives/2008/04/22/all-variables-in-java-must-be-final/#comment-81945</guid>
		<description>Not sure what all this noise is about making all variables final. Seems quite ridiculous to make method parameters final in Java. What is this getting you? The semantics are the same for the caller of your method whether you make them final or not. What exactly are you telling the user of your method with this final keyword?</description>
		<content:encoded><![CDATA[<p>Not sure what all this noise is about making all variables final. Seems quite ridiculous to make method parameters final in Java. What is this getting you? The semantics are the same for the caller of your method whether you make them final or not. What exactly are you telling the user of your method with this final keyword?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stephan</title>
		<link>http://stephan.reposita.org/archives/2008/04/22/all-variables-in-java-must-be-final/#comment-81934</link>
		<dc:creator>stephan</dc:creator>
		<pubDate>Tue, 29 Apr 2008 17:52:25 +0000</pubDate>
		<guid>http://stephan.reposita.org/archives/2008/04/22/all-variables-in-java-must-be-final/#comment-81934</guid>
		<description>As a team manager I apply the wait, wait, wait strategy. Hiring people who put &lt;code&gt;System.exit()&lt;/code&gt;  everywhere does not scale. In the end it does cost much more than they are worth, as you've said.</description>
		<content:encoded><![CDATA[<p>As a team manager I apply the wait, wait, wait strategy. Hiring people who put <code>System.exit()</code>  everywhere does not scale. In the end it does cost much more than they are worth, as you&#8217;ve said.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
