<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/wordpress-mu-1.2.1" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: Gafter&#39;s closures</title>
	<link>http://blog.generationjava.com/roller/bayard/entry/200705084</link>
	<description></description>
	<pubDate>Tue, 02 Dec 2008 13:17:13 +0000</pubDate>
	<generator>http://wordpress.org/?v=wordpress-mu-1.2.1</generator>

	<item>
		<title>By: Michael Nischt</title>
		<link>http://blog.generationjava.com/roller/bayard/entry/200705084#comment-17</link>
		<author>Michael Nischt</author>
		<pubDate>Wed, 09 May 2007 23:48:14 +0000</pubDate>
		<guid>http://blog.generationjava.com/roller/bayard/entry/200705084#comment-17</guid>
		<description>IMHO, the main problems with closures are the 'in place' type definition. The simplest solution would be to use interfaces / classes. This looks like more writing at first, but since you can reuse them the code actually gets cleaner:


interace Foo { Object foo(int a, String b) };

Foo foo  = aObjectWith#barSignatureMethod;
Foo foo2 = antherObjectWith#barSignatureMethod;

vs.

Object#(int a, String b) foo  = aObjectWith#barSignatureMethod;
Object#(int a, String b) foo2  = aObjectWith#barSignatureMethod;


Of course we need somthing to convert between compatible single method intefaces as it would be possible with closures, like an extended type-cast:

interace Bar { String bar(int a, Object b) };

Foo foo = ..
Bar bar = (Foo as Bar) foo;</description>
		<content:encoded><![CDATA[<p>IMHO, the main problems with closures are the &#8216;in place&#8217; type definition. The simplest solution would be to use interfaces / classes. This looks like more writing at first, but since you can reuse them the code actually gets cleaner:</p>
<p>interace Foo { Object foo(int a, String b) };</p>
<p>Foo foo  = aObjectWith#barSignatureMethod;<br />
Foo foo2 = antherObjectWith#barSignatureMethod;</p>
<p>vs.</p>
<p>Object#(int a, String b) foo  = aObjectWith#barSignatureMethod;<br />
Object#(int a, String b) foo2  = aObjectWith#barSignatureMethod;</p>
<p>Of course we need somthing to convert between compatible single method intefaces as it would be possible with closures, like an extended type-cast:</p>
<p>interace Bar { String bar(int a, Object b) };</p>
<p>Foo foo = ..<br />
Bar bar = (Foo as Bar) foo;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stephen Colebourne</title>
		<link>http://blog.generationjava.com/roller/bayard/entry/200705084#comment-16</link>
		<author>Stephen Colebourne</author>
		<pubDate>Wed, 09 May 2007 08:47:55 +0000</pubDate>
		<guid>http://blog.generationjava.com/roller/bayard/entry/200705084#comment-16</guid>
		<description>We need to meet up at some point, so I can convince you of the rightness of FCM closures :-) Perhaps you'll be at the date and time BOF tonight?</description>
		<content:encoded><![CDATA[<p>We need to meet up at some point, so I can convince you of the rightness of FCM closures <img src='http://blog.generationjava.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> Perhaps you&#8217;ll be at the date and time BOF tonight?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
