<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" media="screen" href="/styles/xslt/rss.xslt"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:c9="http://channel9.msdn.com">
<channel>
	<title>Comment Feed for Channel 9 - Inside C# 4.0: dynamic typing, optional parameters, covariance and contravariance</title>
	<atom:link rel="self" type="application/rss+xml" href="http://channel9.msdn.com/Shows/Going+Deep/Inside-C-40-dynamic-type-optional-parameters-more-COM-friendly/RSS"></atom:link>
	<image>
		<url>http://ecn.channel9.msdn.com/o9/previewImages/100/434547_100x75.jpg</url>
		<title>Channel 9 - Inside C# 4.0: dynamic typing, optional parameters, covariance and contravariance</title>
		<link></link>
	</image>
	<description>C# Program Manager Mads Torgersen and C# compiler developers 
Eric Lippert, Chris Burrows, Samuel Ng discuss (and whiteboard) the details inside C# 4.0&#39;s dynamic type, optional&amp;nbsp;parameters&amp;nbsp;and default parameter values, and new support for COM interop (should
 make Office developers giddy). Samuel, Chris and Eric were very busy solving some really hard problems to pull these new features off. It&#39;s great to learn about these new features from the people who actually implemented them. Classic Channel 9!So, how does C# 4.0&#39;s dynamic type&amp;nbsp;work, exactly? What does &amp;quot;more COM friendly&amp;quot; really mean? Covariance and Contravariance? Optional parameters with default values and parameter re-ordering? Why? How?&amp;nbsp;Tune in.
Enjoy!(my apologizes for the slight glitch at the middle of the interview. My camera bluescreened! Fortunately, data captured before the system failure was stored successfuly, but a little tiny piece of the conversation was lost)
</description>
	<link></link>
	<language>en</language>
	<pubDate>Wed, 19 Jun 2013 10:55:58 GMT</pubDate>
	<lastBuildDate>Wed, 19 Jun 2013 10:55:58 GMT</lastBuildDate>
	<generator>Rev9</generator>
	<item>
		<title>Re: Inside C# 4.0: dynamic typing, optional parameters, covariance and contravariance</title>
		<description>
			<![CDATA[How is the dynamic type different from the Object type?<br /><br />edit: nevermind, I never knew that C# couldn't do this.&nbsp; VB has been able to do this since the beginning.<p>posted by spivonious</p>]]>
		</description>
		<link>http://channel9.msdn.com/Shows/Going+Deep/Inside-C-40-dynamic-type-optional-parameters-more-COM-friendly#c633610691090000000</link>
		<pubDate>Fri, 31 Oct 2008 16:58:29 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Shows/Going+Deep/Inside-C-40-dynamic-type-optional-parameters-more-COM-friendly#c633610691090000000</guid>
		<dc:creator>spivonious</dc:creator>
	</item>
	<item>
		<title>Re: Inside C# 4.0: dynamic typing, optional parameters, covariance and contravariance</title>
		<description>
			<![CDATA[awesome cool...<br />Thanx Charles...<br /><br />Just Downloading ..can't wait..<br /><br />Initially on listening about dynamic features i was not sure whether its good to include them..<br /><br />But after all the announcements &amp; pdc talks.., i m really loving C# v4 , now we don't hav to write all the plumming code..that actually is pain..<br /><br />Ch9 ROCKS<br /><p>posted by gaurav.net</p>]]>
		</description>
		<link>http://channel9.msdn.com/Shows/Going+Deep/Inside-C-40-dynamic-type-optional-parameters-more-COM-friendly#c633610713860000000</link>
		<pubDate>Fri, 31 Oct 2008 17:36:26 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Shows/Going+Deep/Inside-C-40-dynamic-type-optional-parameters-more-COM-friendly#c633610713860000000</guid>
		<dc:creator>gaurav.net</dc:creator>
	</item>
	<item>
		<title>Re: Inside C# 4.0: dynamic typing, optional parameters, covariance and contravariance</title>
		<description>
			<![CDATA[I am not sure whether &quot;dyanamic&quot; key word is a good feature or not. I think, if MS wants to provide run time object type resolution support in C#, it should have provided with a library or some thing. I don't like C# becoming another C&#43;&#43;.<br /><br />I like the new covariance feature<br /><br />I like the named parameters, but I don't like&nbsp;changing the order. Also I don't like&nbsp;optional parameters feature. That creates an illusion and makes programmers to worry on non business aspects.<br /><br />My suggestion for optional parametes is:<br /><br />In the method declaration Use attributes to configure default values and while the programmer making invokation of that method let intellisence kicks in for filling the defaul parameteres.<br /><br /><p>posted by Fact Pandit</p>]]>
		</description>
		<link>http://channel9.msdn.com/Shows/Going+Deep/Inside-C-40-dynamic-type-optional-parameters-more-COM-friendly#c633610834530000000</link>
		<pubDate>Fri, 31 Oct 2008 20:57:33 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Shows/Going+Deep/Inside-C-40-dynamic-type-optional-parameters-more-COM-friendly#c633610834530000000</guid>
		<dc:creator>Fact Pandit</dc:creator>
	</item>
	<item>
		<title>Re: Inside C# 4.0: dynamic typing, optional parameters, covariance and contravariance</title>
		<description>
			<![CDATA[Stop adding (polutting)&nbsp;new key word and syntax to C#.&nbsp;&nbsp; It is a complex programming language as of now.&nbsp; The more C#&nbsp;bloating with new stuff in each release&nbsp;(2.0, 3.0, 3.5, and now 4.0), the more it&nbsp;becomes a weaker programming&nbsp;language.&nbsp;&nbsp;&nbsp; Comparing
 the number of keywords and programming constructs of C# to C/C&#43;&#43;,&nbsp;Python, etc. and you will see how bloated C# has become.<br /><br />How about try to provide&nbsp;new features without modifying language for a change.&nbsp; <br /><br /><p>posted by Coder4Hire</p>]]>
		</description>
		<link>http://channel9.msdn.com/Shows/Going+Deep/Inside-C-40-dynamic-type-optional-parameters-more-COM-friendly#c633610865430000000</link>
		<pubDate>Fri, 31 Oct 2008 21:49:03 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Shows/Going+Deep/Inside-C-40-dynamic-type-optional-parameters-more-COM-friendly#c633610865430000000</guid>
		<dc:creator>Coder4Hire</dc:creator>
	</item>
	<item>
		<title>Re: Inside C# 4.0: dynamic typing, optional parameters, covariance and contravariance</title>
		<description>
			<![CDATA[Optional parameters can be a good thing when considering their example.&nbsp; I remember automating some work in excel from c#.&nbsp; I'm stealing this example from
<a href="http://support.microsoft.com/kb/302084">here</a> : <br /><pre class="code">oChart.ChartWizard( oResizeRange, Excel.XlChartType.xl3DColumn, Missing.Value,<br>   Excel.XlRowCol.xlColumns, Missing.Value, Missing.Value, Missing.Value, <br>   Missing.Value, Missing.Value, Missing.Value, Missing.Value );</pre>
[[ becomes ]]<br /><pre class="code">oChart.ChartWizard( <br>    Source : oResizeRange, <br>    Gallery : Excel.XlChartType.xl3DColumn, <br>    PlotBy : Excel.XlRowCol.xlColumns<br>    );<br></pre>
<br />The new version could be a one-liner if i wanted it to be.&nbsp; I find the second version much easier to read, and you get to be explicit about your parameters. Intellisense was a lifesaver, I agree, but I do see the benefit of the new feature compared to just
 letting intellisense take over.<br /><p>posted by obrienslalom</p>]]>
		</description>
		<link>http://channel9.msdn.com/Shows/Going+Deep/Inside-C-40-dynamic-type-optional-parameters-more-COM-friendly#c633610942520000000</link>
		<pubDate>Fri, 31 Oct 2008 23:57:32 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Shows/Going+Deep/Inside-C-40-dynamic-type-optional-parameters-more-COM-friendly#c633610942520000000</guid>
		<dc:creator>obrienslalom</dc:creator>
	</item>
	<item>
		<title>Re: Inside C# 4.0: dynamic typing, optional parameters, covariance and contravariance</title>
		<description>
			<![CDATA[Hmm, ok I know we had the new language at .net 1.0,&nbsp; C# 1.0, and added generics in .net 2.0 C#2.0.&nbsp; extended Generics and added lamdas and extension methods in .net 3.5 C# 3.0.&nbsp;
<br /><br />Enlighten me on Language additions in .net 3.0??&nbsp; <br /><br />Each addition to the langauge so far has added little complexity in the return on productivity.
<br /><br />As a matter of fact the co contra varient stuff should have been there in 2.0.<br /><br />The no pia enhancements is just a no brainer given the fact that .net has to interact with Com code.&nbsp;&nbsp;
<br /><br />I will take any language enhancement that simplefies that impedance missmatch. Or for that matter interacting with win32.&nbsp;
<br /><br />I further Hope Pray, Jump Up and Down Screaming&nbsp; Waving my arms&nbsp; Please please PLEASE implement compiler features to take advantage of the Recursion optimizations offered and .net 4.0 CLR.&nbsp;<br /><br />Douglas<p>posted by DouglasH</p>]]>
		</description>
		<link>http://channel9.msdn.com/Shows/Going+Deep/Inside-C-40-dynamic-type-optional-parameters-more-COM-friendly#c633611003090000000</link>
		<pubDate>Sat, 01 Nov 2008 01:38:29 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Shows/Going+Deep/Inside-C-40-dynamic-type-optional-parameters-more-COM-friendly#c633611003090000000</guid>
		<dc:creator>DouglasH</dc:creator>
	</item>
	<item>
		<title>Re: Inside C# 4.0: dynamic typing, optional parameters, covariance and contravariance</title>
		<description>
			<![CDATA[
<p>I'm half way through, and I have a question.<br /><br />Say you have the following:<br /><br />dynamic x = ...<br /><br />x.M(1,2,3,4,5,6,7,8,9,10);<br />x.M(1,2,3,4,5,6,7,8,9,&quot;a string&quot;);<br />x.M(1,2,3,4,3.14159);<br />x.M(DateTime.Now);<br /><br />Will the generated delegate check parameters one at a time? eg, like this:<br />if (param1Type == typeof(int))<br />{<br />&nbsp;&nbsp; if (param2Type == ...)<br />&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp; ...<br />&nbsp;&nbsp;&nbsp; if (param5Type == int)<br />&nbsp;&nbsp;&nbsp; {...}<br />&nbsp;&nbsp;&nbsp; else if (param5Type == double)<br />&nbsp;&nbsp; { ..}<br />} else if (param1Type == DateTime) {}<br /><br />Or will it check each one repeatedly?<br /><br />Also, will there be any sort of profile-guided optimisation in that delegate? Say that it notices&nbsp; x.M(DateTime) is called the most, will it reorder the tests?</p>
<p>posted by Pon</p>]]>
		</description>
		<link>http://channel9.msdn.com/Shows/Going+Deep/Inside-C-40-dynamic-type-optional-parameters-more-COM-friendly#c633611159540000000</link>
		<pubDate>Sat, 01 Nov 2008 05:59:14 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Shows/Going+Deep/Inside-C-40-dynamic-type-optional-parameters-more-COM-friendly#c633611159540000000</guid>
		<dc:creator>Pon</dc:creator>
	</item>
	<item>
		<title>Re: Inside C# 4.0: dynamic typing, optional parameters, covariance and contravariance</title>
		<description>
			<![CDATA[Hi Pon,<br /><br />At the risk of distraction from my main point, let me tell you what we do right now, and then I'll address your concerns about performance. The way the C# runtime binder works is that once it's located a correct &quot;behavior&quot; for a particular call site, it feeds
 that behavior back to the DLR, which manages the delegate. The DLR sequences these rules given the order that it receives them from the binder, and they do not interleave. Which I think means that in your example, we &quot;check each one repeatedly.&quot; Furthermore,
 at the level of the delegate generation, there is no profile-guided optimisation.<br /><br />But that doesn't address your deeper concern about performance. Let me assure you that we care very much about the performance of the code that we're going to&nbsp;gen and that you're going to use, and we plan to measure it, set goals, and make changes to achieve
 those goals, both in the C# runtime binder and in the DLR. So it may be the case that the behavior I just described will change before we release the final version, or it may be that it's irrelevant. Consider that the delegate is going to be jitted and that
 the jitter could, in some cases,&nbsp;perhaps, perform the first optimization that you&nbsp;mention without the DLR having to worry about it. Obviously, in that case we wouldn't worry about it.<br /><br />I can't say what particular changes, architectural or otherwise,&nbsp;will come about because of our performance investigations, but I can say that there will be some.<br /><br />chris<p>posted by cburrows</p>]]>
		</description>
		<link>http://channel9.msdn.com/Shows/Going+Deep/Inside-C-40-dynamic-type-optional-parameters-more-COM-friendly#c633611680920000000</link>
		<pubDate>Sat, 01 Nov 2008 20:28:12 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Shows/Going+Deep/Inside-C-40-dynamic-type-optional-parameters-more-COM-friendly#c633611680920000000</guid>
		<dc:creator>cburrows</dc:creator>
	</item>
	<item>
		<title>Re: Inside C# 4.0: dynamic typing, optional parameters, covariance and contravariance</title>
		<description>
			<![CDATA[<br />Looks like you guys want to have the cake and eat it too <img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-1.gif' alt='Smiley' /><br />From what you guys say, C# is moving from a pure classical language to add features of&nbsp;prototypical languages like javascript.<br /><br />Will you guys also be using JSON style name/value pairs to create heirarchical data structures with the &quot;dynamic&quot; data type?&nbsp;&nbsp;I am guessing you will allow the developers to also &quot;augment&quot; the &quot;dynamic&quot; data type in a similar fashion.&nbsp; If you do,&nbsp;how are you
 going to provide for&nbsp;encapsulation (everything is public access)<br /><br />The covariance and contravariance stuff is cool.&nbsp; When I saw the example, I was&nbsp;thinking&nbsp;&quot;duh, but of course&quot;<br /><br />I like the&nbsp;optional/default parameters and named parameters too.&nbsp; I have been&nbsp;wanting that for atleast 4 years now <img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-1.gif' alt='Smiley' /><br /><br />Keep rocking<br />-Rvz<br /><br /><br /><br />&nbsp;<p>posted by Rvz</p>]]>
		</description>
		<link>http://channel9.msdn.com/Shows/Going+Deep/Inside-C-40-dynamic-type-optional-parameters-more-COM-friendly#c633612044330000000</link>
		<pubDate>Sun, 02 Nov 2008 06:33:53 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Shows/Going+Deep/Inside-C-40-dynamic-type-optional-parameters-more-COM-friendly#c633612044330000000</guid>
		<dc:creator>Rvz</dc:creator>
	</item>
	<item>
		<title>Re: Inside C# 4.0: dynamic typing, optional parameters, covariance and contravariance</title>
		<description>
			<![CDATA[
<p>I'm wondering what influence the optional and named parameters will have on interfaces&nbsp;and inheritance in general.&nbsp;Will a method parameter have to have the same name in an implementation as in the interface? This would help for code quality and maintainability.
 If not, will the compiler keep track of how a parameter gets renamed in the inheritance hierarchy or do all signatures get treated individually? Can a non optional parameter be made optional in an inherited method? What about the other way round?<br /><br />One more question: when will C# get XML literals like Visual Basic? I've been waintig for this since Comega...</p>
<p>Wolfgang</p>
<p>posted by gallo</p>]]>
		</description>
		<link>http://channel9.msdn.com/Shows/Going+Deep/Inside-C-40-dynamic-type-optional-parameters-more-COM-friendly#c633612180970000000</link>
		<pubDate>Sun, 02 Nov 2008 10:21:37 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Shows/Going+Deep/Inside-C-40-dynamic-type-optional-parameters-more-COM-friendly#c633612180970000000</guid>
		<dc:creator>gallo</dc:creator>
	</item>
	<item>
		<title>Re: Inside C# 4.0: dynamic typing, optional parameters, covariance and contravariance</title>
		<description>
			<![CDATA[Isn't late binding evil?&nbsp; Don't we want compile time errors and not want runtime errors?
<br />I guess, if you have to interact with something non-native, this is pretty cool.<br /><br />Never mind, I think i got it <img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-1.gif' alt='Smiley' /><br /><p>posted by Tengiz</p>]]>
		</description>
		<link>http://channel9.msdn.com/Shows/Going+Deep/Inside-C-40-dynamic-type-optional-parameters-more-COM-friendly#c633612417040000000</link>
		<pubDate>Sun, 02 Nov 2008 16:55:04 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Shows/Going+Deep/Inside-C-40-dynamic-type-optional-parameters-more-COM-friendly#c633612417040000000</guid>
		<dc:creator>Tengiz</dc:creator>
	</item>
	<item>
		<title>Re: Inside C# 4.0: dynamic typing, optional parameters, covariance and contravariance</title>
		<description>
			<![CDATA[i think the people who's critical of the dynamic keyword really should watch anders session on pdc.. (future of c#)<br /><br />first of all, compared to fuby for example c# has relativly few keywords (including keyword overloads) imo<br /><br />the dynamic keyword is not exactly hard to learn, its basically just a special type, and it enables so soooo much.
<br /><br />i dont think one should regard the dynamic keyword as a feature for c# per se, but for interop with other things that arent c#. there will always be need to talk to com, talk to js (in silverlight in perticular) and increasingly, talk to things written in dynamic
 languages. Thats what the dynamic is for.. <br />no one is suggesting that all c# code should be re written to use the dynamic keyword.. its just an option to enable things that used to be really hard or even impossible<br /><br />as anders said in his talk, convergence is the key.&nbsp;<br /><br />watch the talk.. its pretty awsome <img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-1.gif' alt='Smiley' /> <br />great work c# team : ) cant wait to get my hands on this stuff <img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-1.gif' alt='Smiley' /> <br /><p>posted by aL_</p>]]>
		</description>
		<link>http://channel9.msdn.com/Shows/Going+Deep/Inside-C-40-dynamic-type-optional-parameters-more-COM-friendly#c633613105290000000</link>
		<pubDate>Mon, 03 Nov 2008 12:02:09 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Shows/Going+Deep/Inside-C-40-dynamic-type-optional-parameters-more-COM-friendly#c633613105290000000</guid>
		<dc:creator>aL_</dc:creator>
	</item>
	<item>
		<title>Re: Inside C# 4.0: dynamic typing, optional parameters, covariance and contravariance</title>
		<description>
			<![CDATA[by the way, the true awsomeness of the dynamic keyword and the dlr is imo that you can create your own resolve mechanism.. for example in anders sessions he creates a&nbsp;dictionary that, if its cast to a dynamic, gets the keys from method calls:<br />dic.key = value<br /><br />pretty heavy stuff..<br /><br />its its all just opt., you dont have to use any of the dynamix stuff if you dont want to <img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-1.gif' alt='Smiley' />
<p>posted by aL_</p>]]>
		</description>
		<link>http://channel9.msdn.com/Shows/Going+Deep/Inside-C-40-dynamic-type-optional-parameters-more-COM-friendly#c633613124570000000</link>
		<pubDate>Mon, 03 Nov 2008 12:34:17 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Shows/Going+Deep/Inside-C-40-dynamic-type-optional-parameters-more-COM-friendly#c633613124570000000</guid>
		<dc:creator>aL_</dc:creator>
	</item>
	<item>
		<title>Re: Inside C# 4.0: dynamic typing, optional parameters, covariance and contravariance</title>
		<description>
			<![CDATA[
<p>Ive worked a good amount between C# and COM. Optional parameters are nice, but i've found ways to work without them. I think allowing reordering of parameters is only asking for trouble. Especially in the talk the first thing talked about with this feature
 is how developers can screw themselves.&nbsp;I think it weakens the language to let things blow up at runtime rather than compile time.</p>
<p>Great that these things are possible but I don't plan on using them.</p>
<p>posted by Dark_Halmut</p>]]>
		</description>
		<link>http://channel9.msdn.com/Shows/Going+Deep/Inside-C-40-dynamic-type-optional-parameters-more-COM-friendly#c633613334760000000</link>
		<pubDate>Mon, 03 Nov 2008 18:24:36 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Shows/Going+Deep/Inside-C-40-dynamic-type-optional-parameters-more-COM-friendly#c633613334760000000</guid>
		<dc:creator>Dark_Halmut</dc:creator>
	</item>
	<item>
		<title>Re: Inside C# 4.0: dynamic typing, optional parameters, covariance and contravariance</title>
		<description>
			<![CDATA[According to Sam Ng, around 16:00, DLR binds arguments according to their runtime type. However, function overload resolution&nbsp;is based on static types of argument in all languages known to me. My knowledge could be lacking in this case.<p>posted by Tanveer Badar</p>]]>
		</description>
		<link>http://channel9.msdn.com/Shows/Going+Deep/Inside-C-40-dynamic-type-optional-parameters-more-COM-friendly#c633614166350000000</link>
		<pubDate>Tue, 04 Nov 2008 17:30:35 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Shows/Going+Deep/Inside-C-40-dynamic-type-optional-parameters-more-COM-friendly#c633614166350000000</guid>
		<dc:creator>Tanveer Badar</dc:creator>
	</item>
	<item>
		<title>Re: Inside C# 4.0: dynamic typing, optional parameters, covariance and contravariance</title>
		<description>
			<![CDATA[Perhaps I'm missing something here - and somebody can point this out to me.&nbsp; In regards to default parameters and named parameters, is this done at the compile time or run time?&nbsp; If I am calling a external class as such Foo(x:1,y:1), and they change there
 class from Foo(x, y) to Foo(z,y), would I still work because it still has the same type of footprint because it was done at compile time?&nbsp; I think it would, from what I got out of it.&nbsp; However, if I recompiled mine, I should get an error as x no longer exists,
 and I should change it to z.&nbsp; Now how about default params?&nbsp; If I call Bar(x:1) to a defined method of Bar(x, y=3), then I would make the call with a value of 3.&nbsp; But if the method is changed to Bar(x, y=7), do I make the call now with a 7 or a 3 - is it based
 on compile time or runtime?&nbsp; I would hope it is runtime, as you grab the current value based on the current metadata of the class - but I don't know.<p>posted by saidinarts</p>]]>
		</description>
		<link>http://channel9.msdn.com/Shows/Going+Deep/Inside-C-40-dynamic-type-optional-parameters-more-COM-friendly#c633614317120000000</link>
		<pubDate>Tue, 04 Nov 2008 21:41:52 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Shows/Going+Deep/Inside-C-40-dynamic-type-optional-parameters-more-COM-friendly#c633614317120000000</guid>
		<dc:creator>saidinarts</dc:creator>
	</item>
	<item>
		<title>Re: Inside C# 4.0: dynamic typing, optional parameters, covariance and contravariance</title>
		<description>
			<![CDATA[
<p>ive got a question about the method caching in the dlr..<br />what if the arguments of a method is of type dynamic? lets say ive got a ruby int and a ruby string and i pass that into a ruby method M, all from c# (by calling libraries written in ruby for instance)<br /><br />how would the dlr cacher handle that? both the arguments whould be dynamic but actually contain diffrent types..<br />im pretty sure the dlr handles it but it would be fun to hear more about that <img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-1.gif' alt='Smiley' /><br /><br />awsome work as always charles <img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-1.gif' alt='Smiley' /></p>
<p>posted by aL_</p>]]>
		</description>
		<link>http://channel9.msdn.com/Shows/Going+Deep/Inside-C-40-dynamic-type-optional-parameters-more-COM-friendly#c633615875390000000</link>
		<pubDate>Thu, 06 Nov 2008 16:58:59 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Shows/Going+Deep/Inside-C-40-dynamic-type-optional-parameters-more-COM-friendly#c633615875390000000</guid>
		<dc:creator>aL_</dc:creator>
	</item>
	<item>
		<title>Re: Inside C# 4.0: dynamic typing, optional parameters, covariance and contravariance</title>
		<description>
			<![CDATA[Tell you one thing, the dynamic keyword is going to reduce the amount of code required<br />to use reflection and such. I'm all for it.<br /><p>posted by TimothyP</p>]]>
		</description>
		<link>http://channel9.msdn.com/Shows/Going+Deep/Inside-C-40-dynamic-type-optional-parameters-more-COM-friendly#c633620983140000000</link>
		<pubDate>Wed, 12 Nov 2008 14:51:54 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Shows/Going+Deep/Inside-C-40-dynamic-type-optional-parameters-more-COM-friendly#c633620983140000000</guid>
		<dc:creator>TimothyP</dc:creator>
	</item>
	<item>
		<title>Re: Inside C# 4.0: dynamic typing, optional parameters, covariance and contravariance</title>
		<description>
			<![CDATA[I like the covariance extensions. I think it is also useful that C# is extended to
<strong>consume</strong> COM interfaces, and integrate with dynamic languages.&nbsp;<br /><br />But, can't you expose the dynamic as a plain class, and the optional/named parameters as attributes, rather than extending C# language syntax? It is there mostly for interop scenarios, and this will discourage people from using unless they have good reasons.&nbsp;<br /><br /><br /><p>posted by jan.devaan</p>]]>
		</description>
		<link>http://channel9.msdn.com/Shows/Going+Deep/Inside-C-40-dynamic-type-optional-parameters-more-COM-friendly#c633632481200000000</link>
		<pubDate>Tue, 25 Nov 2008 22:15:20 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Shows/Going+Deep/Inside-C-40-dynamic-type-optional-parameters-more-COM-friendly#c633632481200000000</guid>
		<dc:creator>jan.devaan</dc:creator>
	</item>
	<item>
		<title>Re: Inside C# 4.0: dynamic typing, optional parameters, covariance and contravariance</title>
		<description>
			<![CDATA[In the example for overload resolution this example was given:<br /><br />M( int x, int y);<br />M( string x, sting y);<br /><br />Then it was explained how the resoulution worked. It was said that the very first thing to be checked is if all the names are in the method's parameters. I found it strange that it does not do a simple argument type check before matching names in the paramters
 list. If you know you are getting two integers in the call, you know that the overload must accept at least two integers.
<br />So if you have:<br /><br />M( int x = 0, int y = 22, int z = 10, string text = &quot;no&quot;);<br />M( string x = &quot;20&quot;, sting y = &quot;90&quot;, int data = 200 );<br /><br /><br />Suppose I&nbsp; call M( y = 300, x = 200); The complier knows that I am giving the M two ints. If I now was to &quot;check if all the names are there&quot;, that would yield both Ms. On the other hand by simply counting the number of parameters of each type in the call and
 comparing the counts with the overloads you will find the right one. There is only one M that accepts two ints or more. This will enables you to discard all overloads that does not have any chance at matching the signature, and focus on the ones that does
 in the later steps that involves name matching etc.<br /><br />I may just be plain wrong, and this may be inefficent for reasons I don't know. Maybe this even happens behind the scenes and just wasn't metioned in the interview. Just my thoughts after watching <img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-1.gif' alt='Smiley' /><br /><br />Great stuff btw <img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-1.gif' alt='Smiley' /><br /><p>posted by tuxbear</p>]]>
		</description>
		<link>http://channel9.msdn.com/Shows/Going+Deep/Inside-C-40-dynamic-type-optional-parameters-more-COM-friendly#c633640713570000000</link>
		<pubDate>Fri, 05 Dec 2008 10:55:57 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Shows/Going+Deep/Inside-C-40-dynamic-type-optional-parameters-more-COM-friendly#c633640713570000000</guid>
		<dc:creator>tuxbear</dc:creator>
	</item>
	<item>
		<title>Re: Inside C# 4.0: dynamic typing, optional parameters, covariance and contravariance</title>
		<description>
			<![CDATA[Q:
<div class="inReplyTo" id="ctl00_MainPlaceHolder_EntryList_ctl01_EntryTemplate_ReplyTo_InReplyToContainer">
<div class="inReplyToControls">
<div class="inReplyToLink"><a class="expand" id="ctl00_MainPlaceHolder_EntryList_ctl01_EntryTemplate_ReplyTo_InReplyToHyperLink" href="">In reply to {0}</a>
</div>
<div class="inReplyToGoToLink"></div>
</div>
<div class="inReplyToBody" id="ctl00_MainPlaceHolder_EntryList_ctl01_EntryTemplate_ReplyTo_InReplyToBody">
</div>
</div>
<div class="attachment" id="ctl00_MainPlaceHolder_EntryList_ctl01_EntryTemplate_AttachmentContainer">
<font class="downloadLabel" id="ctl00_MainPlaceHolder_EntryList_ctl01_EntryTemplate_DownloadLabel">Download:</font><font class="sizeLabel" id="ctl00_MainPlaceHolder_EntryList_ctl01_EntryTemplate_DownloadSize"></font><font class="pendingLabel" id="ctl00_MainPlaceHolder_EntryList_ctl01_EntryTemplate_PendingLabel">[Pending]</font>
</div>
How is the dynamic type different from the Object type?<br /><br />if declare let#s say a COM-object as dynamic you can call it's methods, e.g. <br /><br />dynamic ApplicationClass = new ApplicationClass();<br />wordApp.Quit();<br /><br />if you'd declare it as object &quot;wordApp.Quit();&quot; wouldn't compile<br />since it not a method belonging to System.Object<br /><br />Also all the stuff concerning the cacheing and analyzing done by DLR<br />to dynamic vars, is a probably a huge differnce in terms of performance<br /><br />Chris<br /><p>posted by cebiT</p>]]>
		</description>
		<link>http://channel9.msdn.com/Shows/Going+Deep/Inside-C-40-dynamic-type-optional-parameters-more-COM-friendly#c633672263440000000</link>
		<pubDate>Sat, 10 Jan 2009 23:19:04 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Shows/Going+Deep/Inside-C-40-dynamic-type-optional-parameters-more-COM-friendly#c633672263440000000</guid>
		<dc:creator>cebiT</dc:creator>
	</item>
	<item>
		<title>Re: Inside C# 4.0: dynamic typing, optional parameters, covariance and contravariance</title>
		<description>
			<![CDATA[I like the faeatures regarding co- and contravariance. I also like optional parameters.&nbsp; But do we really need this dynamic stuff? Are there situations you need it (when you understand polymorphism?). Will there be a way to turn this feature off?
<br /><br />Regards,<br />m<p>posted by Manfred</p>]]>
		</description>
		<link>http://channel9.msdn.com/Shows/Going+Deep/Inside-C-40-dynamic-type-optional-parameters-more-COM-friendly#c633680570260000000</link>
		<pubDate>Tue, 20 Jan 2009 14:03:46 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Shows/Going+Deep/Inside-C-40-dynamic-type-optional-parameters-more-COM-friendly#c633680570260000000</guid>
		<dc:creator>Manfred</dc:creator>
	</item>
	<item>
		<title>Re: Inside C# 4.0: dynamic typing, optional parameters, covariance and contravariance</title>
		<description>
			<![CDATA[
<p>C# 4.0 is great and all, but HOW DO I GET ONE OF THOSE T-SHIRTS!!!</p>
<p>posted by micahburnett</p>]]>
		</description>
		<link>http://channel9.msdn.com/Shows/Going+Deep/Inside-C-40-dynamic-type-optional-parameters-more-COM-friendly#c633881929140000000</link>
		<pubDate>Thu, 10 Sep 2009 15:21:54 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Shows/Going+Deep/Inside-C-40-dynamic-type-optional-parameters-more-COM-friendly#c633881929140000000</guid>
		<dc:creator>micahburnett</dc:creator>
	</item>
	<item>
		<title>Re: Inside C# 4.0: dynamic typing, optional parameters, covariance and contravariance</title>
		<description>
			<![CDATA[
<p>Regarding the complexity of overload resolution, it doesn't seem quite as bad as made out in the show (espcially compared to writing the compiler in the first place)</p>
<p>Please note I am assuming you can't mix named and non named args in the same call - that would certainly complicate things.</p>
<p>&nbsp;</p>
<p>I agree the first thing is to consider the parameter names available to filter out invalid candidates.</p>
<p>Second I would use the types to filter candidates further (considering valid implicit casts and base classes) This didn't seem to be mentioned.</p>
<p>Then I would represent the candidate methods with a integer (with lots of bits) using 1 bit per arg.&nbsp; Turn on these bits for each arg that is matched (by name) in the call. Turn on other bits that do not have an arg supplied in the call if they have a default
 value.</p>
<p>Compare those integers with a mask representing the number of args in the candidates. Those that have all their args fulfilled remain candidates.</p>
<p>If there is still more than one candiate overload, either throw an error, or have a policy to select the method.</p>
<p>&nbsp;</p>
<p>I'd be interested to get comments on this approach.</p>
<p>Apologies if I've opened a can of worms. I've only given this 5 mins thought, but I have also written a complier.</p>
<p>&nbsp;</p>
<p>Martin</p>
<p>&nbsp;</p>
<p>posted by martin0</p>]]>
		</description>
		<link>http://channel9.msdn.com/Shows/Going+Deep/Inside-C-40-dynamic-type-optional-parameters-more-COM-friendly#c633882956440000000</link>
		<pubDate>Fri, 11 Sep 2009 19:54:04 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Shows/Going+Deep/Inside-C-40-dynamic-type-optional-parameters-more-COM-friendly#c633882956440000000</guid>
		<dc:creator>martin0</dc:creator>
	</item>
	<item>
		<title>Re: Inside C# 4.0: dynamic typing, optional parameters, covariance and contravariance</title>
		<description>
			<![CDATA[
<p>I agree. I can't imagine what C# 10 will be like.</p>
<p>posted by nolisj</p>]]>
		</description>
		<link>http://channel9.msdn.com/Shows/Going+Deep/Inside-C-40-dynamic-type-optional-parameters-more-COM-friendly#c633892673180000000</link>
		<pubDate>Wed, 23 Sep 2009 01:48:38 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Shows/Going+Deep/Inside-C-40-dynamic-type-optional-parameters-more-COM-friendly#c633892673180000000</guid>
		<dc:creator>nolisj</dc:creator>
	</item>
	<item>
		<title>Re: Inside C# 4.0: dynamic typing, optional parameters, covariance and contravariance</title>
		<description>
			<![CDATA[
<p>I agree in part.&nbsp; The neat thing about python is that it is compartmentalized.&nbsp; If you don't need functionality, you don't include it.&nbsp; A language should be extremely simple and elegant.&nbsp; If you need to build a skyscaper, you need a crane.&nbsp; But you build
 the crane using smaller tools.&nbsp; And you build those tools with basic simple tools. C# has become a do everything Swiss Army knife.&nbsp; I am not saying that C# has become bloatware, but I will say that it is becoming dangerously close to being complex.&nbsp; I have
 to wonder if that complexity is really necessary, and if it is, whether it is the result of a basic design defect that poses challenges that require the complexity to overcome.&nbsp;
</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>posted by Jik</p>]]>
		</description>
		<link>http://channel9.msdn.com/Shows/Going+Deep/Inside-C-40-dynamic-type-optional-parameters-more-COM-friendly#c634070256870000000</link>
		<pubDate>Fri, 16 Apr 2010 14:41:27 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Shows/Going+Deep/Inside-C-40-dynamic-type-optional-parameters-more-COM-friendly#c634070256870000000</guid>
		<dc:creator>Jik</dc:creator>
	</item>
	<item>
		<title>Re: Inside C# 4.0: dynamic typing, optional parameters, covariance and contravariance</title>
		<description>
			<![CDATA[
<p>no its gets wonderful and powerfull an programming technology</p>
<p>&nbsp;</p>
<p>go on Microsoft add most beatiful things too we are waiting;)<img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-5.gif' alt='Wink' /><span> </span></p>
<p>posted by black orca</p>]]>
		</description>
		<link>http://channel9.msdn.com/Shows/Going+Deep/Inside-C-40-dynamic-type-optional-parameters-more-COM-friendly#c634073850810000000</link>
		<pubDate>Tue, 20 Apr 2010 18:31:21 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Shows/Going+Deep/Inside-C-40-dynamic-type-optional-parameters-more-COM-friendly#c634073850810000000</guid>
		<dc:creator>black orca</dc:creator>
	</item>
	<item>
		<title>Re: Inside C# 4.0: dynamic typing, optional parameters, covariance and contravariance</title>
		<description>
			<![CDATA[
<p>My favorite part about all the new features is that, if you don't like, don't understand, or are frightened by them, you don't have to use them. &nbsp;All your unpolluted old code still works. &nbsp;For my part, I'm really excited to start incorporating a lot of the
 dynamic tools some of my compatriots have been enjoying for the last few years.</p>
<p>posted by swingsetacid</p>]]>
		</description>
		<link>http://channel9.msdn.com/Shows/Going+Deep/Inside-C-40-dynamic-type-optional-parameters-more-COM-friendly#c634078946190000000</link>
		<pubDate>Mon, 26 Apr 2010 16:03:39 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Shows/Going+Deep/Inside-C-40-dynamic-type-optional-parameters-more-COM-friendly#c634078946190000000</guid>
		<dc:creator>swingsetacid</dc:creator>
	</item>
	<item>
		<title>Re: Inside C# 4.0: dynamic typing, optional parameters, covariance and contravariance</title>
		<description>
			<![CDATA[
<p>Another interesting article on .NET 4.0 dynamics can be seen here (<a href="http://nightowlcoders.blogspot.com/2010/05/building-better-dynamic-net-40.html">http://nightowlcoders.blogspot.com/2010/05/building-better-dynamic-net-40.html</a>) &nbsp;This outlines
 how to take advantage of string based property access across a dynamic object. &nbsp;This is a really powerful combination when put along side other features using Dynamics.</p>
<p>&nbsp;</p>
<p>Feel free to re-link and follow!</p>
<p>&nbsp;</p>
<p>-Night Owl Coders</p>
<p>posted by NightOwlCoders</p>]]>
		</description>
		<link>http://channel9.msdn.com/Shows/Going+Deep/Inside-C-40-dynamic-type-optional-parameters-more-COM-friendly#c634087921520000000</link>
		<pubDate>Fri, 07 May 2010 01:22:32 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Shows/Going+Deep/Inside-C-40-dynamic-type-optional-parameters-more-COM-friendly#c634087921520000000</guid>
		<dc:creator>NightOwlCoders</dc:creator>
	</item>
	<item>
		<title>Re: Inside C# 4.0: dynamic typing, optional parameters, covariance and contravariance</title>
		<description>
			<![CDATA[You guys are brilliant!<p>posted by Ross</p>]]>
		</description>
		<link>http://channel9.msdn.com/Shows/Going+Deep/Inside-C-40-dynamic-type-optional-parameters-more-COM-friendly#c634231499570000000</link>
		<pubDate>Wed, 20 Oct 2010 05:39:17 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Shows/Going+Deep/Inside-C-40-dynamic-type-optional-parameters-more-COM-friendly#c634231499570000000</guid>
		<dc:creator>Ross</dc:creator>
	</item>
	<item>
		<title>Re: Inside C# 4.0: dynamic typing, optional parameters, covariance and contravariance</title>
		<description>
			<![CDATA[@swingsetacid:<br />"My favorite part about all the new features is that, if you don't like,  don't understand, or are frightened by them, you don't have to use them"<br />Have you ever worked as a programmer? Maybe YOU don't use them, but then the guy down the hall does, and uses them badly because he doesn't understand them, and next thing you know you're fixing his awful code. At least, that's the source of this fear.<br />Personally I don't worry much about most of these features, but covariance/contravariance worry me because they remove checks on type safety. I expect my C# code to be type correct as long as I avoid explicit downcasting (and now, the dynamic keyword), but this change to the language violates that expectation because it effectively allows implicit downcasting. And, worse, it allows it using the exact same syntax that I previously expected to be safe.<p>posted by Nate</p>]]>
		</description>
		<link>http://channel9.msdn.com/Shows/Going+Deep/Inside-C-40-dynamic-type-optional-parameters-more-COM-friendly#c634248489750000000</link>
		<pubDate>Mon, 08 Nov 2010 21:36:15 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Shows/Going+Deep/Inside-C-40-dynamic-type-optional-parameters-more-COM-friendly#c634248489750000000</guid>
		<dc:creator>Nate</dc:creator>
	</item>
	<item>
		<title>Re: Inside C# 4.0: dynamic typing, optional parameters, covariance and contravariance</title>
		<description>
			<![CDATA[@spivonious:@nolisj:<p>posted by mohammed</p>]]>
		</description>
		<link>http://channel9.msdn.com/Shows/Going+Deep/Inside-C-40-dynamic-type-optional-parameters-more-COM-friendly#c634261466730000000</link>
		<pubDate>Tue, 23 Nov 2010 22:04:33 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Shows/Going+Deep/Inside-C-40-dynamic-type-optional-parameters-more-COM-friendly#c634261466730000000</guid>
		<dc:creator>mohammed</dc:creator>
	</item>
</channel>
</rss>