<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Even cleaner Map, List, and Array support</title>
	<atom:link href="http://almaer.com/blog/even-cleaner-map-list-and-array-support/feed" rel="self" type="application/rss+xml" />
	<link>http://almaer.com/blog/even-cleaner-map-list-and-array-support</link>
	<description>blogging about life, the universe, and everything tech</description>
	<lastBuildDate>Tue, 03 Jan 2012 22:08:49 -0800</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: James Strachan</title>
		<link>http://almaer.com/blog/even-cleaner-map-list-and-array-support/comment-page-1#comment-19609</link>
		<dc:creator>James Strachan</dc:creator>
		<pubDate>Thu, 24 Feb 2005 07:24:22 +0000</pubDate>
		<guid isPermaLink="false">http://almaer.com/blog2/even-cleaner-map-list-and-array-support#comment-19609</guid>
		<description>Mike

&#039;as&#039; is different from a Java cast currently in that &#039;as&#039; forces a smart coercion. Casting remains the same as Java (in that it could barf and doesn&#039;t do anything clever).

James
</description>
		<content:encoded><![CDATA[<p>Mike</p>
<p>&#8216;as&#8217; is different from a Java cast currently in that &#8216;as&#8217; forces a smart coercion. Casting remains the same as Java (in that it could barf and doesn&#8217;t do anything clever).</p>
<p>James</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James Strachan</title>
		<link>http://almaer.com/blog/even-cleaner-map-list-and-array-support/comment-page-1#comment-19610</link>
		<dc:creator>James Strachan</dc:creator>
		<pubDate>Thu, 24 Feb 2005 07:24:22 +0000</pubDate>
		<guid isPermaLink="false">http://almaer.com/blog2/even-cleaner-map-list-and-array-support#comment-19610</guid>
		<description>Mike

&#039;as&#039; is different from a Java cast currently in that &#039;as&#039; forces a smart coercion. Casting remains the same as Java (in that it could barf and doesn&#039;t do anything clever).

James
</description>
		<content:encoded><![CDATA[<p>Mike</p>
<p>&#8216;as&#8217; is different from a Java cast currently in that &#8216;as&#8217; forces a smart coercion. Casting remains the same as Java (in that it could barf and doesn&#8217;t do anything clever).</p>
<p>James</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Emmanuel Pirsch</title>
		<link>http://almaer.com/blog/even-cleaner-map-list-and-array-support/comment-page-1#comment-19607</link>
		<dc:creator>Emmanuel Pirsch</dc:creator>
		<pubDate>Tue, 22 Feb 2005 21:32:21 +0000</pubDate>
		<guid isPermaLink="false">http://almaer.com/blog2/even-cleaner-map-list-and-array-support#comment-19607</guid>
		<description>Dion,

It&#039;s not that I&#039;m offended... But you managed to make typos on both my first and last name. Now... I&#039;m used to people making typos with my last name. But both at the same time... You&#039;re the king ;-)

</description>
		<content:encoded><![CDATA[<p>Dion,</p>
<p>It&#8217;s not that I&#8217;m offended&#8230; But you managed to make typos on both my first and last name. Now&#8230; I&#8217;m used to people making typos with my last name. But both at the same time&#8230; You&#8217;re the king ;-)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Emmanuel Pirsch</title>
		<link>http://almaer.com/blog/even-cleaner-map-list-and-array-support/comment-page-1#comment-19608</link>
		<dc:creator>Emmanuel Pirsch</dc:creator>
		<pubDate>Tue, 22 Feb 2005 21:32:21 +0000</pubDate>
		<guid isPermaLink="false">http://almaer.com/blog2/even-cleaner-map-list-and-array-support#comment-19608</guid>
		<description>Dion,

It&#039;s not that I&#039;m offended... But you managed to make typos on both my first and last name. Now... I&#039;m used to people making typos with my last name. But both at the same time... You&#039;re the king ;-)

</description>
		<content:encoded><![CDATA[<p>Dion,</p>
<p>It&#8217;s not that I&#8217;m offended&#8230; But you managed to make typos on both my first and last name. Now&#8230; I&#8217;m used to people making typos with my last name. But both at the same time&#8230; You&#8217;re the king ;-)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike Spille</title>
		<link>http://almaer.com/blog/even-cleaner-map-list-and-array-support/comment-page-1#comment-19605</link>
		<dc:creator>Mike Spille</dc:creator>
		<pubDate>Tue, 22 Feb 2005 21:08:39 +0000</pubDate>
		<guid isPermaLink="false">http://almaer.com/blog2/even-cleaner-map-list-and-array-support#comment-19605</guid>
		<description>In most Groovy code this is a &quot;don&#039;t care&quot; sort of item - you shouldn&#039;t care whether you have an array or a List, and generally a list will do just fine.  This becomes an issue mostly when you&#039;re calling into Java code - in which case I agree with Emmanuel.  This is really a question of auto-boxing - you&#039;ve got a list and want to pass it to a Java method taking &quot;int[]&quot; or whatever.  Or you&#039;ve got an array and need to pass it into a List.  In this case Groovy should auto-convert for you and throw an exception at runtime if your list isn&#039;t homogenous and compatible with the target array.  Going from array to list is trivially, and given that it&#039;s scripting no one cares what the List implementation is.

Of course this is all a red herring - &quot;as&quot; isn&#039;t proposed here to fix the array problem per se.  The real reason for &quot;as&quot; is because some Groovy people thought it&#039;d be neat to get rid of Java style casts and invent a new cast syntax.  That&#039;s what &quot;as&quot; here, and the Groovy guys are merely trying to apply &quot;as&quot; to the arrayList problem.
</description>
		<content:encoded><![CDATA[<p>In most Groovy code this is a &#8220;don&#8217;t care&#8221; sort of item &#8211; you shouldn&#8217;t care whether you have an array or a List, and generally a list will do just fine.  This becomes an issue mostly when you&#8217;re calling into Java code &#8211; in which case I agree with Emmanuel.  This is really a question of auto-boxing &#8211; you&#8217;ve got a list and want to pass it to a Java method taking &#8220;int[]&#8221; or whatever.  Or you&#8217;ve got an array and need to pass it into a List.  In this case Groovy should auto-convert for you and throw an exception at runtime if your list isn&#8217;t homogenous and compatible with the target array.  Going from array to list is trivially, and given that it&#8217;s scripting no one cares what the List implementation is.</p>
<p>Of course this is all a red herring &#8211; &#8220;as&#8221; isn&#8217;t proposed here to fix the array problem per se.  The real reason for &#8220;as&#8221; is because some Groovy people thought it&#8217;d be neat to get rid of Java style casts and invent a new cast syntax.  That&#8217;s what &#8220;as&#8221; here, and the Groovy guys are merely trying to apply &#8220;as&#8221; to the arrayList problem.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike Spille</title>
		<link>http://almaer.com/blog/even-cleaner-map-list-and-array-support/comment-page-1#comment-19606</link>
		<dc:creator>Mike Spille</dc:creator>
		<pubDate>Tue, 22 Feb 2005 21:08:39 +0000</pubDate>
		<guid isPermaLink="false">http://almaer.com/blog2/even-cleaner-map-list-and-array-support#comment-19606</guid>
		<description>In most Groovy code this is a &quot;don&#039;t care&quot; sort of item - you shouldn&#039;t care whether you have an array or a List, and generally a list will do just fine.  This becomes an issue mostly when you&#039;re calling into Java code - in which case I agree with Emmanuel.  This is really a question of auto-boxing - you&#039;ve got a list and want to pass it to a Java method taking &quot;int[]&quot; or whatever.  Or you&#039;ve got an array and need to pass it into a List.  In this case Groovy should auto-convert for you and throw an exception at runtime if your list isn&#039;t homogenous and compatible with the target array.  Going from array to list is trivially, and given that it&#039;s scripting no one cares what the List implementation is.

Of course this is all a red herring - &quot;as&quot; isn&#039;t proposed here to fix the array problem per se.  The real reason for &quot;as&quot; is because some Groovy people thought it&#039;d be neat to get rid of Java style casts and invent a new cast syntax.  That&#039;s what &quot;as&quot; here, and the Groovy guys are merely trying to apply &quot;as&quot; to the arrayList problem.
</description>
		<content:encoded><![CDATA[<p>In most Groovy code this is a &#8220;don&#8217;t care&#8221; sort of item &#8211; you shouldn&#8217;t care whether you have an array or a List, and generally a list will do just fine.  This becomes an issue mostly when you&#8217;re calling into Java code &#8211; in which case I agree with Emmanuel.  This is really a question of auto-boxing &#8211; you&#8217;ve got a list and want to pass it to a Java method taking &#8220;int[]&#8221; or whatever.  Or you&#8217;ve got an array and need to pass it into a List.  In this case Groovy should auto-convert for you and throw an exception at runtime if your list isn&#8217;t homogenous and compatible with the target array.  Going from array to list is trivially, and given that it&#8217;s scripting no one cares what the List implementation is.</p>
<p>Of course this is all a red herring &#8211; &#8220;as&#8221; isn&#8217;t proposed here to fix the array problem per se.  The real reason for &#8220;as&#8221; is because some Groovy people thought it&#8217;d be neat to get rid of Java style casts and invent a new cast syntax.  That&#8217;s what &#8220;as&#8221; here, and the Groovy guys are merely trying to apply &#8220;as&#8221; to the arrayList problem.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Emmanuel Pirsch</title>
		<link>http://almaer.com/blog/even-cleaner-map-list-and-array-support/comment-page-1#comment-19603</link>
		<dc:creator>Emmanuel Pirsch</dc:creator>
		<pubDate>Tue, 22 Feb 2005 19:40:23 +0000</pubDate>
		<guid isPermaLink="false">http://almaer.com/blog2/even-cleaner-map-list-and-array-support#comment-19603</guid>
		<description>Yes, that would be nice. But, unless we use an implementation class (instead of an interface), it would add more complexity to the compiler. The compiler will now have to choose an implementation for SortableMap (or should it be SortedMap).

I think that either strong typing or casting could be used so I could say :

int[] x=  [1, 2, 3]
x= (int[]) [1, 2, 3]
x= (TreeMap) [&quot;name&quot; : name, &quot;value&quot; : value]

The first two case should work a bit like autoboxing. The third case would be like creating a new instance of the TreeMap class and then adding the entries.

</description>
		<content:encoded><![CDATA[<p>Yes, that would be nice. But, unless we use an implementation class (instead of an interface), it would add more complexity to the compiler. The compiler will now have to choose an implementation for SortableMap (or should it be SortedMap).</p>
<p>I think that either strong typing or casting could be used so I could say :</p>
<p>int[] x=  [1, 2, 3]<br />
x= (int[]) [1, 2, 3]<br />
x= (TreeMap) ["name" : name, "value" : value]</p>
<p>The first two case should work a bit like autoboxing. The third case would be like creating a new instance of the TreeMap class and then adding the entries.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Emmanuel Pirsch</title>
		<link>http://almaer.com/blog/even-cleaner-map-list-and-array-support/comment-page-1#comment-19604</link>
		<dc:creator>Emmanuel Pirsch</dc:creator>
		<pubDate>Tue, 22 Feb 2005 19:40:23 +0000</pubDate>
		<guid isPermaLink="false">http://almaer.com/blog2/even-cleaner-map-list-and-array-support#comment-19604</guid>
		<description>Yes, that would be nice. But, unless we use an implementation class (instead of an interface), it would add more complexity to the compiler. The compiler will now have to choose an implementation for SortableMap (or should it be SortedMap).

I think that either strong typing or casting could be used so I could say :

int[] x=  [1, 2, 3]
x= (int[]) [1, 2, 3]
x= (TreeMap) [&quot;name&quot; : name, &quot;value&quot; : value]

The first two case should work a bit like autoboxing. The third case would be like creating a new instance of the TreeMap class and then adding the entries.

</description>
		<content:encoded><![CDATA[<p>Yes, that would be nice. But, unless we use an implementation class (instead of an interface), it would add more complexity to the compiler. The compiler will now have to choose an implementation for SortableMap (or should it be SortedMap).</p>
<p>I think that either strong typing or casting could be used so I could say :</p>
<p>int[] x=  [1, 2, 3]<br />
x= (int[]) [1, 2, 3]<br />
x= (TreeMap) ["name" : name, "value" : value]</p>
<p>The first two case should work a bit like autoboxing. The third case would be like creating a new instance of the TreeMap class and then adding the entries.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dion</title>
		<link>http://almaer.com/blog/even-cleaner-map-list-and-array-support/comment-page-1#comment-19601</link>
		<dc:creator>Dion</dc:creator>
		<pubDate>Tue, 22 Feb 2005 19:11:32 +0000</pubDate>
		<guid isPermaLink="false">http://almaer.com/blog2/even-cleaner-map-list-and-array-support#comment-19601</guid>
		<description>Hi Emmanuel -

int[] x = [1, 2, 3]

works great too.... for the Array case.

I like the &#039;as&#039; for chosing types of lists and maps.

&quot;I want a list, oh and use this type for me will you?&quot;

&quot;I want a list, oh and use an arry will you?&quot;
</description>
		<content:encoded><![CDATA[<p>Hi Emmanuel -</p>
<p>int[] x = [1, 2, 3]</p>
<p>works great too&#8230;. for the Array case.</p>
<p>I like the &#8216;as&#8217; for chosing types of lists and maps.</p>
<p>&#8220;I want a list, oh and use this type for me will you?&#8221;</p>
<p>&#8220;I want a list, oh and use an arry will you?&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dion</title>
		<link>http://almaer.com/blog/even-cleaner-map-list-and-array-support/comment-page-1#comment-19602</link>
		<dc:creator>Dion</dc:creator>
		<pubDate>Tue, 22 Feb 2005 19:11:32 +0000</pubDate>
		<guid isPermaLink="false">http://almaer.com/blog2/even-cleaner-map-list-and-array-support#comment-19602</guid>
		<description>Hi Emmanuel -

int[] x = [1, 2, 3]

works great too.... for the Array case.

I like the &#039;as&#039; for chosing types of lists and maps.

&quot;I want a list, oh and use this type for me will you?&quot;

&quot;I want a list, oh and use an arry will you?&quot;
</description>
		<content:encoded><![CDATA[<p>Hi Emmanuel -</p>
<p>int[] x = [1, 2, 3]</p>
<p>works great too&#8230;. for the Array case.</p>
<p>I like the &#8216;as&#8217; for chosing types of lists and maps.</p>
<p>&#8220;I want a list, oh and use this type for me will you?&#8221;</p>
<p>&#8220;I want a list, oh and use an arry will you?&#8221;</p>
]]></content:encoded>
	</item>
</channel>
</rss>

