<?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: Stop creating custom delegate types</title>
	<atom:link href="http://lostechies.com/jimmybogard/2008/03/26/stop-creating-custom-delegate-types/feed/" rel="self" type="application/rss+xml" />
	<link>http://lostechies.com/jimmybogard/2008/03/26/stop-creating-custom-delegate-types/</link>
	<description>Strong opinions, weakly held</description>
	<lastBuildDate>Fri, 17 May 2013 09:02:38 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4.2</generator>
	<item>
		<title>By: John Hughes</title>
		<link>http://lostechies.com/jimmybogard/2008/03/26/stop-creating-custom-delegate-types/#comment-299</link>
		<dc:creator>John Hughes</dc:creator>
		<pubDate>Sat, 23 Oct 2010 07:00:12 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jimmy_bogard/archive/2008/03/26/stop-creating-custom-delegate-types.aspx#comment-299</guid>
		<description>The use of Action&lt;T1, T2...&gt; gives no implicit meaning of that the parameters are as opposed to a custom delegate. I personally think custom delegates are the way to go if you are exposing an API to the outside world.</description>
		<content:encoded><![CDATA[<p>The use of Action<t1 , T2...> gives no implicit meaning of that the parameters are as opposed to a custom delegate. I personally think custom delegates are the way to go if you are exposing an API to the outside world.</t1></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Frank Quednau</title>
		<link>http://lostechies.com/jimmybogard/2008/03/26/stop-creating-custom-delegate-types/#comment-298</link>
		<dc:creator>Frank Quednau</dc:creator>
		<pubDate>Thu, 10 Apr 2008 07:53:38 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jimmy_bogard/archive/2008/03/26/stop-creating-custom-delegate-types.aspx#comment-298</guid>
		<description>Recently I encountered one issue with generic delegates: They cannot be marshalled to static external functions imported from some dll. In this case you will have to define your own non-generic delegate even though you may have a fitting one.</description>
		<content:encoded><![CDATA[<p>Recently I encountered one issue with generic delegates: They cannot be marshalled to static external functions imported from some dll. In this case you will have to define your own non-generic delegate even though you may have a fitting one.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jimmy Bogard</title>
		<link>http://lostechies.com/jimmybogard/2008/03/26/stop-creating-custom-delegate-types/#comment-297</link>
		<dc:creator>Jimmy Bogard</dc:creator>
		<pubDate>Mon, 31 Mar 2008 11:17:31 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jimmy_bogard/archive/2008/03/26/stop-creating-custom-delegate-types.aspx#comment-297</guid>
		<description>@Bart

If you have developers applying wholesale advice from what they read on blogs, I think your problem is in the personnel/training department.

This isn&#039;t just my advice, it comes from Microsoft&#039;s Framework Design Guidelines folks as well.  It applies only to .NET 3.5 environments.</description>
		<content:encoded><![CDATA[<p>@Bart</p>
<p>If you have developers applying wholesale advice from what they read on blogs, I think your problem is in the personnel/training department.</p>
<p>This isn&#8217;t just my advice, it comes from Microsoft&#8217;s Framework Design Guidelines folks as well.  It applies only to .NET 3.5 environments.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bart Czernicki</title>
		<link>http://lostechies.com/jimmybogard/2008/03/26/stop-creating-custom-delegate-types/#comment-296</link>
		<dc:creator>Bart Czernicki</dc:creator>
		<pubDate>Sat, 29 Mar 2008 01:00:21 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jimmy_bogard/archive/2008/03/26/stop-creating-custom-delegate-types.aspx#comment-296</guid>
		<description>@bogardj

&quot;many&quot; is the keyword here.  

I completely agree that Func/Action provide u enough overrides to not have to create a delegate.  Even if, you have a method that takes 8 parameters u should be passing in an object instead probably and using a Func/Action

However, with having a mixed dev environment 2005/2008 (which we are transitioning from) it would cause MAJOR coding horrors if we had developers go on blogs and simply apply what a few people agree is a good practice.</description>
		<content:encoded><![CDATA[<p>@bogardj</p>
<p>&#8220;many&#8221; is the keyword here.  </p>
<p>I completely agree that Func/Action provide u enough overrides to not have to create a delegate.  Even if, you have a method that takes 8 parameters u should be passing in an object instead probably and using a Func/Action</p>
<p>However, with having a mixed dev environment 2005/2008 (which we are transitioning from) it would cause MAJOR coding horrors if we had developers go on blogs and simply apply what a few people agree is a good practice.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jimmy Bogard</title>
		<link>http://lostechies.com/jimmybogard/2008/03/26/stop-creating-custom-delegate-types/#comment-295</link>
		<dc:creator>Jimmy Bogard</dc:creator>
		<pubDate>Sat, 29 Mar 2008 00:26:54 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jimmy_bogard/archive/2008/03/26/stop-creating-custom-delegate-types.aspx#comment-295</guid>
		<description>@Bart

Many of the C# 3.0 features work just fine with .NET 2.0.  C# 3.0 still compiles to the CLR 2.0.  It&#039;s just not as nice :)

Yes, this only applies to .NET 3.5.  It&#039;s still annoying creating these custom types, especially when you have APIs that expose properties and methods that are designed to work with Action/Func and something has to translate.</description>
		<content:encoded><![CDATA[<p>@Bart</p>
<p>Many of the C# 3.0 features work just fine with .NET 2.0.  C# 3.0 still compiles to the CLR 2.0.  It&#8217;s just not as nice <img src='http://lostechies.com/jimmybogard/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Yes, this only applies to .NET 3.5.  It&#8217;s still annoying creating these custom types, especially when you have APIs that expose properties and methods that are designed to work with Action/Func and something has to translate.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jimmy Bogard</title>
		<link>http://lostechies.com/jimmybogard/2008/03/26/stop-creating-custom-delegate-types/#comment-294</link>
		<dc:creator>Jimmy Bogard</dc:creator>
		<pubDate>Sat, 29 Mar 2008 00:24:28 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jimmy_bogard/archive/2008/03/26/stop-creating-custom-delegate-types.aspx#comment-294</guid>
		<description>@Jon

Hooray!  I knew someone would find a way for it to work easily.  Thanks!</description>
		<content:encoded><![CDATA[<p>@Jon</p>
<p>Hooray!  I knew someone would find a way for it to work easily.  Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jimmy Bogard</title>
		<link>http://lostechies.com/jimmybogard/2008/03/26/stop-creating-custom-delegate-types/#comment-293</link>
		<dc:creator>Jimmy Bogard</dc:creator>
		<pubDate>Sat, 29 Mar 2008 00:23:15 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jimmy_bogard/archive/2008/03/26/stop-creating-custom-delegate-types.aspx#comment-293</guid>
		<description>@Jon

Hooray!  I knew someone would find a way for it to work easily.  Thanks!</description>
		<content:encoded><![CDATA[<p>@Jon</p>
<p>Hooray!  I knew someone would find a way for it to work easily.  Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Justin Etheredge</title>
		<link>http://lostechies.com/jimmybogard/2008/03/26/stop-creating-custom-delegate-types/#comment-292</link>
		<dc:creator>Justin Etheredge</dc:creator>
		<pubDate>Fri, 28 Mar 2008 19:55:31 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jimmy_bogard/archive/2008/03/26/stop-creating-custom-delegate-types.aspx#comment-292</guid>
		<description>Here here, that is an excellent suggestion for those working on a completely 3.5 codebase.</description>
		<content:encoded><![CDATA[<p>Here here, that is an excellent suggestion for those working on a completely 3.5 codebase.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bart Czernicki</title>
		<link>http://lostechies.com/jimmybogard/2008/03/26/stop-creating-custom-delegate-types/#comment-291</link>
		<dc:creator>Bart Czernicki</dc:creator>
		<pubDate>Fri, 28 Mar 2008 19:34:50 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jimmy_bogard/archive/2008/03/26/stop-creating-custom-delegate-types.aspx#comment-291</guid>
		<description>Uhh...no.  2 reasons:

- backwards compatibility:
I could list you a few examples why u still would want custom delegate types, but say ur maintaining an API that has to work with 2.0 code...why exactly would u start using Func/Action??

Same goes for automatic properties, collection initializers, implicit anon types...all the &quot;syntactic sugar&quot; for C# 3.0

- standards:

The achitect should define what the best practices are and code standards are.  If you ur standards are to write code a specific way and then u have developers auto update their code to what they see on a blog, ur going to have bigger problems</description>
		<content:encoded><![CDATA[<p>Uhh&#8230;no.  2 reasons:</p>
<p>- backwards compatibility:<br />
I could list you a few examples why u still would want custom delegate types, but say ur maintaining an API that has to work with 2.0 code&#8230;why exactly would u start using Func/Action??</p>
<p>Same goes for automatic properties, collection initializers, implicit anon types&#8230;all the &#8220;syntactic sugar&#8221; for C# 3.0</p>
<p>- standards:</p>
<p>The achitect should define what the best practices are and code standards are.  If you ur standards are to write code a specific way and then u have developers auto update their code to what they see on a blog, ur going to have bigger problems</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jon Skeet</title>
		<link>http://lostechies.com/jimmybogard/2008/03/26/stop-creating-custom-delegate-types/#comment-290</link>
		<dc:creator>Jon Skeet</dc:creator>
		<pubDate>Fri, 28 Mar 2008 07:31:29 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jimmy_bogard/archive/2008/03/26/stop-creating-custom-delegate-types.aspx#comment-290</guid>
		<description>It&#039;s not quite as bad as you&#039;re making it out to be. Yes, there&#039;s no direct conversion - but you don&#039;t need to write any extra methods to convert from one to another. The following assignments both work:

match1 = new Predicate&lt;string&gt;(match2);
match1 = new Predicate&lt;string&gt;(match3);

No wrapper methods required.

That said, I do agree that it&#039;s best not to create your own delegate types by and large.

Jon</description>
		<content:encoded><![CDATA[<p>It&#8217;s not quite as bad as you&#8217;re making it out to be. Yes, there&#8217;s no direct conversion &#8211; but you don&#8217;t need to write any extra methods to convert from one to another. The following assignments both work:</p>
<p>match1 = new Predicate<string>(match2);<br />
match1 = new Predicate</string><string>(match3);</p>
<p>No wrapper methods required.</p>
<p>That said, I do agree that it&#8217;s best not to create your own delegate types by and large.</p>
<p>Jon</string></p>
]]></content:encoded>
	</item>
</channel>
</rss>
