<?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: Generic Variance in C# 4.0</title>
	<atom:link href="http://kohari.org/2008/10/28/generic-variance-in-c-40/feed/" rel="self" type="application/rss+xml" />
	<link>http://kohari.org/2008/10/28/generic-variance-in-c-40/</link>
	<description>Rambling and occasional wisdom from Nate Kohari</description>
	<lastBuildDate>Tue, 09 Mar 2010 12:47:18 -0500</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Oidon</title>
		<link>http://kohari.org/2008/10/28/generic-variance-in-c-40/comment-page-1/#comment-227</link>
		<dc:creator>Oidon</dc:creator>
		<pubDate>Tue, 18 Nov 2008 15:18:58 +0000</pubDate>
		<guid isPermaLink="false">http://kohari.org/?p=172#comment-227</guid>
		<description>As far as I understand, variance support is only being added for generic interfaces and delegates. (Actually, version 2.0 of the CLI has always supported this; C# is just catching up now.) Thus, your &quot;class Foo&quot; should not compile.</description>
		<content:encoded><![CDATA[<p>As far as I understand, variance support is only being added for generic interfaces and delegates. (Actually, version 2.0 of the CLI has always supported this; C# is just catching up now.) Thus, your &#8220;class Foo&#8221; should not compile.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Buu Nguyen</title>
		<link>http://kohari.org/2008/10/28/generic-variance-in-c-40/comment-page-1/#comment-226</link>
		<dc:creator>Buu Nguyen</dc:creator>
		<pubDate>Fri, 14 Nov 2008 12:57:23 +0000</pubDate>
		<guid isPermaLink="false">http://kohari.org/?p=172#comment-226</guid>
		<description>&gt;&gt;IList{string} strings = new List{string}();
&gt;&gt;IList{object} objects = strings;
In IList, T appears in both output and input positions (i.e. add, T []), therefore IList can&#039;t be covariant on T.  In Java, this would be possible with wildcards.</description>
		<content:encoded><![CDATA[<p>&gt;&gt;IList{string} strings = new List{string}();<br />
&gt;&gt;IList{object} objects = strings;<br />
In IList, T appears in both output and input positions (i.e. add, T []), therefore IList can&#8217;t be covariant on T.  In Java, this would be possible with wildcards.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nate Kohari</title>
		<link>http://kohari.org/2008/10/28/generic-variance-in-c-40/comment-page-1/#comment-225</link>
		<dc:creator>Nate Kohari</dc:creator>
		<pubDate>Thu, 06 Nov 2008 14:46:40 +0000</pubDate>
		<guid isPermaLink="false">http://kohari.org/?p=172#comment-225</guid>
		<description>@Sebastian: That&#039;s a good point. The list example comes directly from the official explanation of the new features, but I haven&#039;t tried it myself in the VS2010 CTP. I&#039;d be interested to know...</description>
		<content:encoded><![CDATA[<p>@Sebastian: That&#8217;s a good point. The list example comes directly from the official explanation of the new features, but I haven&#8217;t tried it myself in the VS2010 CTP. I&#8217;d be interested to know&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sebastian Mueller</title>
		<link>http://kohari.org/2008/10/28/generic-variance-in-c-40/comment-page-1/#comment-222</link>
		<dc:creator>Sebastian Mueller</dc:creator>
		<pubDate>Fri, 31 Oct 2008 08:40:56 +0000</pubDate>
		<guid isPermaLink="false">http://kohari.org/?p=172#comment-222</guid>
		<description>Damn, the comment system removed my brackets - replace {} in the below code with the corresponding brackets

If you say that this works:

IList{string} strings = new List{string}();
IList{object} objects = strings;

how is this goingo to work then:

objects.Add(new object());

?
this should work for IList{object} but not for IList{string} !

so I don&#039;t think that IList is going to have an &quot;out&quot; type parameter, rather the GetEnumerable method of IList{T} might become IEnumerable{out T} - though I haven&#039;t read the spec yet and I don&#039;t know if you can actually add the out or in keyword to certain methods/properties to the class parameter.
(BTW: That&#039;s the way Java Generics do it: out T and in T is like &quot;? extends T&quot; and &quot;? super T&quot;)

Other than that, great article and thanks for the link!

/Sebastian</description>
		<content:encoded><![CDATA[<p>Damn, the comment system removed my brackets &#8211; replace {} in the below code with the corresponding brackets</p>
<p>If you say that this works:</p>
<p>IList{string} strings = new List{string}();<br />
IList{object} objects = strings;</p>
<p>how is this goingo to work then:</p>
<p>objects.Add(new object());</p>
<p>?<br />
this should work for IList{object} but not for IList{string} !</p>
<p>so I don&#8217;t think that IList is going to have an &#8220;out&#8221; type parameter, rather the GetEnumerable method of IList{T} might become IEnumerable{out T} &#8211; though I haven&#8217;t read the spec yet and I don&#8217;t know if you can actually add the out or in keyword to certain methods/properties to the class parameter.<br />
(BTW: That&#8217;s the way Java Generics do it: out T and in T is like &#8220;? extends T&#8221; and &#8220;? super T&#8221;)</p>
<p>Other than that, great article and thanks for the link!</p>
<p>/Sebastian</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sebastian Mueller</title>
		<link>http://kohari.org/2008/10/28/generic-variance-in-c-40/comment-page-1/#comment-224</link>
		<dc:creator>Sebastian Mueller</dc:creator>
		<pubDate>Fri, 31 Oct 2008 08:37:57 +0000</pubDate>
		<guid isPermaLink="false">http://kohari.org/?p=172#comment-224</guid>
		<description>If you say that this works:

IList strings = new List();
IList objects = strings;

how is this goingo to work then:

objects.Add(new object());

?
this should work for IList but not for IList !

so I don&#039;t think that IList is going to have an &quot;out&quot; type parameter, rather the GetEnumerable method of IList might become IEnumerable - though I haven&#039;t read the spec yet and I don&#039;t know if you can actually add the out or in keyword to certain methods/properties to the class parameter.
(BTW: That&#039;s the way Java Generics do it: out T and in T is like &quot;? extends T&quot; and &quot;? super T&quot;)

Other than that, great article and thanks for the link!

/Sebastian</description>
		<content:encoded><![CDATA[<p>If you say that this works:</p>
<p>IList strings = new List();<br />
IList objects = strings;</p>
<p>how is this goingo to work then:</p>
<p>objects.Add(new object());</p>
<p>?<br />
this should work for IList but not for IList !</p>
<p>so I don&#8217;t think that IList is going to have an &#8220;out&#8221; type parameter, rather the GetEnumerable method of IList might become IEnumerable &#8211; though I haven&#8217;t read the spec yet and I don&#8217;t know if you can actually add the out or in keyword to certain methods/properties to the class parameter.<br />
(BTW: That&#8217;s the way Java Generics do it: out T and in T is like &#8220;? extends T&#8221; and &#8220;? super T&#8221;)</p>
<p>Other than that, great article and thanks for the link!</p>
<p>/Sebastian</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Reflective Perspective - Chris Alcock &#187; The Morning Brew #212</title>
		<link>http://kohari.org/2008/10/28/generic-variance-in-c-40/comment-page-1/#comment-223</link>
		<dc:creator>Reflective Perspective - Chris Alcock &#187; The Morning Brew #212</dc:creator>
		<pubDate>Thu, 30 Oct 2008 08:32:25 +0000</pubDate>
		<guid isPermaLink="false">http://kohari.org/?p=172#comment-223</guid>
		<description>[...] Generic Variance in C# 4.0 - Nate Kohari looks at the variance of generic types in C#4 [...]</description>
		<content:encoded><![CDATA[<p>[...] Generic Variance in C# 4.0 &#8211; Nate Kohari looks at the variance of generic types in C#4 [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
