<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>public static final &#187; Closures</title>
	<atom:link href="http://www.publicstaticfinal.de/tag/closures/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.publicstaticfinal.de</link>
	<description>the constant Java blog</description>
	<lastBuildDate>Fri, 25 Feb 2011 14:48:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Closures in Java</title>
		<link>http://www.publicstaticfinal.de/2009/12/14/closures-in-java/</link>
		<comments>http://www.publicstaticfinal.de/2009/12/14/closures-in-java/#comments</comments>
		<pubDate>Mon, 14 Dec 2009 10:37:27 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[Closures]]></category>
		<category><![CDATA[JSE7]]></category>

		<guid isPermaLink="false">http://www.publicstaticfinal.de/?p=117</guid>
		<description><![CDATA[One of the most discussed (and most controversial) topics in the last years concerning the future of Java was the introduction of Closures. After 2008&#8242;s Devoxx Closures were off the Java7 release. One year later at the same event Mark Reinhold revoked it and announced that Closures will be in Java7 (and hence delaying Java [...]]]></description>
			<content:encoded><![CDATA[<p>One of the most discussed (and most controversial) topics in the last years concerning the future of Java was the introduction of <a title="Wikipedia: Closures" href="http://en.wikipedia.org/wiki/Closure_(computer_science)" target="_blank">Closures</a>. After 2008&#8242;s Devoxx Closures were off the Java7 release. One year later at the same event Mark Reinhold revoked it and announced that Closures will be in Java7 (and hence <a title="Java7 will be delayed" href="http://mail.openjdk.java.net/pipermail/jdk7-dev/2009-November/001054.html" target="_blank">delaying Java 7 for a few months</a>).<span id="more-117"></span></p>
<p>For days ago, Reinhold published a<a href="http://cr.openjdk.java.net/~mr/lambda/straw-man/" target="_blank"> straw-man proposal</a> of how closures (or more formal: lambda expressions) could look like in Java. I&#8217;m still not sure whether I&#8217;m happy about closures in Java or not. On the one hand it definitely helps to reduce the number of lines of code since it drops redundant information (e.g. the decleration of a Runnable).</p>
<pre class="brush: java; title: ; notranslate">
Thread th = new Thread(new Runnable() {
                         public void run() {
                            doSomeStuff();
                            doMoreStuff();
                         }
                       });

Thread th = new Thread(#(){ doSomeStuff(); doMoreStuff(); } )
</pre>
<p>On the other hand it increases the complexity of the JVM itself and makes maintenance a bit harder. This will affect only few developers but it&#8217;s another stop to the grave of Java (death by non-maintainability).</p>
<p>I think time will tell how Closures will affect the Java world and if it&#8217;s a good idea to include it or not.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.publicstaticfinal.de/2009/12/14/closures-in-java/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

