<?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: Caveats of C# 4.0 optional parameters</title>
	<atom:link href="http://lostechies.com/jimmybogard/2010/05/18/caveats-of-c-4-0-optional-parameters/feed/" rel="self" type="application/rss+xml" />
	<link>http://lostechies.com/jimmybogard/2010/05/18/caveats-of-c-4-0-optional-parameters/</link>
	<description>Strong opinions, weakly held</description>
	<lastBuildDate>Thu, 23 May 2013 23:40:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4.2</generator>
	<item>
		<title>By: .Net Training in Chennai</title>
		<link>http://lostechies.com/jimmybogard/2010/05/18/caveats-of-c-4-0-optional-parameters/#comment-5385</link>
		<dc:creator>.Net Training in Chennai</dc:creator>
		<pubDate>Wed, 19 Dec 2012 13:37:00 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jimmy_bogard/archive/2010/05/18/caveats-of-c-4-0-optional-parameters.aspx#comment-5385</guid>
		<description>C# does not
support comma-separated gaps in the argument list.</description>
		<content:encoded><![CDATA[<p>C# does not<br />
support comma-separated gaps in the argument list.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: My Daily Shared Bookmarksfboiton&#039;s blog &#124; fboiton&#039;s blog</title>
		<link>http://lostechies.com/jimmybogard/2010/05/18/caveats-of-c-4-0-optional-parameters/#comment-4664</link>
		<dc:creator>My Daily Shared Bookmarksfboiton&#039;s blog &#124; fboiton&#039;s blog</dc:creator>
		<pubDate>Sat, 07 Jul 2012 20:11:51 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jimmy_bogard/archive/2010/05/18/caveats-of-c-4-0-optional-parameters.aspx#comment-4664</guid>
		<description>[...] Caveats of C# 4.0 optional parameters &#124; Jimmy Bogard&#8217;s Blog &#8211; [...]</description>
		<content:encoded><![CDATA[<p>[...] Caveats of C# 4.0 optional parameters | Jimmy Bogard&#8217;s Blog &#8211; [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://lostechies.com/jimmybogard/2010/05/18/caveats-of-c-4-0-optional-parameters/#comment-3613</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Tue, 19 Jul 2011 12:00:00 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jimmy_bogard/archive/2010/05/18/caveats-of-c-4-0-optional-parameters.aspx#comment-3613</guid>
		<description>Nullable types are there for ya! You can do int? instead of int foo = 0</description>
		<content:encoded><![CDATA[<p>Nullable types are there for ya! You can do int? instead of int foo = 0</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jerome Meyers</title>
		<link>http://lostechies.com/jimmybogard/2010/05/18/caveats-of-c-4-0-optional-parameters/#comment-3612</link>
		<dc:creator>Jerome Meyers</dc:creator>
		<pubDate>Mon, 18 Jul 2011 06:33:00 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jimmy_bogard/archive/2010/05/18/caveats-of-c-4-0-optional-parameters.aspx#comment-3612</guid>
		<description>You write: &quot;However, I still have to deal with the user not applying the filter, so I have some code to deal with this.&quot;  So... how do you get around this?  This is exactly the problem I am encountering.  I can&#039;t use optional parameters... so, what do I do?

Thanks,
jeromeyers</description>
		<content:encoded><![CDATA[<p>You write: &#8220;However, I still have to deal with the user not applying the filter, so I have some code to deal with this.&#8221;  So&#8230; how do you get around this?  This is exactly the problem I am encountering.  I can&#8217;t use optional parameters&#8230; so, what do I do?</p>
<p>Thanks,<br />
jeromeyers</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sam</title>
		<link>http://lostechies.com/jimmybogard/2010/05/18/caveats-of-c-4-0-optional-parameters/#comment-2418</link>
		<dc:creator>Sam</dc:creator>
		<pubDate>Fri, 20 Aug 2010 21:21:10 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jimmy_bogard/archive/2010/05/18/caveats-of-c-4-0-optional-parameters.aspx#comment-2418</guid>
		<description>Argh, I just got burned by CS0854. Boo urns!</description>
		<content:encoded><![CDATA[<p>Argh, I just got burned by CS0854. Boo urns!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Graham</title>
		<link>http://lostechies.com/jimmybogard/2010/05/18/caveats-of-c-4-0-optional-parameters/#comment-2417</link>
		<dc:creator>Graham</dc:creator>
		<pubDate>Fri, 21 May 2010 09:48:34 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jimmy_bogard/archive/2010/05/18/caveats-of-c-4-0-optional-parameters.aspx#comment-2417</guid>
		<description>I&#039;ve seen some really insidious bugs caused by, admittedly bad, use of optional parameters (in VB6). Where the method signature had changed but the calling code hadn&#039;t, meaning the arguments had shifted one to the left (or right). Like anything, you just have to be careful how you use it.</description>
		<content:encoded><![CDATA[<p>I&#8217;ve seen some really insidious bugs caused by, admittedly bad, use of optional parameters (in VB6). Where the method signature had changed but the calling code hadn&#8217;t, meaning the arguments had shifted one to the left (or right). Like anything, you just have to be careful how you use it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bogardj</title>
		<link>http://lostechies.com/jimmybogard/2010/05/18/caveats-of-c-4-0-optional-parameters/#comment-2416</link>
		<dc:creator>bogardj</dc:creator>
		<pubDate>Thu, 20 May 2010 19:09:00 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jimmy_bogard/archive/2010/05/18/caveats-of-c-4-0-optional-parameters.aspx#comment-2416</guid>
		<description>@Brendan

In the original code, the input was a variable, but the pattern was a literal.  Well-named variables still won&#039;t guarantee I don&#039;t accidentally switch the order when I call the method, however.</description>
		<content:encoded><![CDATA[<p>@Brendan</p>
<p>In the original code, the input was a variable, but the pattern was a literal.  Well-named variables still won&#8217;t guarantee I don&#8217;t accidentally switch the order when I call the method, however.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brendan Enrick</title>
		<link>http://lostechies.com/jimmybogard/2010/05/18/caveats-of-c-4-0-optional-parameters/#comment-2415</link>
		<dc:creator>Brendan Enrick</dc:creator>
		<pubDate>Thu, 20 May 2010 18:29:31 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jimmy_bogard/archive/2010/05/18/caveats-of-c-4-0-optional-parameters.aspx#comment-2415</guid>
		<description>With the RegEx example there is something else that&#039;s been built into every version of C# which also allows us to know which one is the pattern and which one the input.

I think the technical name is &quot;variables&quot;. Once we extract those literals into variables like you obviously do in your production code it becomes very obvious which parameter is which. (I admit we can&#039;t at a glance tell if you mixed them up though. I hope you tested the code and made sure it worked though.)</description>
		<content:encoded><![CDATA[<p>With the RegEx example there is something else that&#8217;s been built into every version of C# which also allows us to know which one is the pattern and which one the input.</p>
<p>I think the technical name is &#8220;variables&#8221;. Once we extract those literals into variables like you obviously do in your production code it becomes very obvious which parameter is which. (I admit we can&#8217;t at a glance tell if you mixed them up though. I hope you tested the code and made sure it worked though.)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: joe</title>
		<link>http://lostechies.com/jimmybogard/2010/05/18/caveats-of-c-4-0-optional-parameters/#comment-2414</link>
		<dc:creator>joe</dc:creator>
		<pubDate>Wed, 19 May 2010 19:10:12 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jimmy_bogard/archive/2010/05/18/caveats-of-c-4-0-optional-parameters.aspx#comment-2414</guid>
		<description>VB has had optional parameters since before it was a .net language.   And they were frequently used as a hack to work around the lack of method overloads.</description>
		<content:encoded><![CDATA[<p>VB has had optional parameters since before it was a .net language.   And they were frequently used as a hack to work around the lack of method overloads.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: For #2 I'd say OPs shouldn't be used</title>
		<link>http://lostechies.com/jimmybogard/2010/05/18/caveats-of-c-4-0-optional-parameters/#comment-2413</link>
		<dc:creator>For #2 I'd say OPs shouldn't be used</dc:creator>
		<pubDate>Wed, 19 May 2010 13:55:51 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jimmy_bogard/archive/2010/05/18/caveats-of-c-4-0-optional-parameters.aspx#comment-2413</guid>
		<description>If it causes a recompile when its not even a relink, that the set of signatures for each class/method are identical, then it&#039;s not worth it.</description>
		<content:encoded><![CDATA[<p>If it causes a recompile when its not even a relink, that the set of signatures for each class/method are identical, then it&#8217;s not worth it.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
