<?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: Extension Methods, Nulls, Namespaces and Precedence in C#</title>
	<atom:link href="http://gen5.info/q/2008/07/03/extension-methods-nulls-namespaces-and-precedence-in-c/feed/" rel="self" type="application/rss+xml" />
	<link>http://gen5.info/q/2008/07/03/extension-methods-nulls-namespaces-and-precedence-in-c/</link>
	<description>Towards Intelligent Systems</description>
	<pubDate>Wed, 10 Mar 2010 08:40:23 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Paul Houle</title>
		<link>http://gen5.info/q/2008/07/03/extension-methods-nulls-namespaces-and-precedence-in-c/comment-page-1/#comment-1720</link>
		<dc:creator>Paul Houle</dc:creator>
		<pubDate>Sun, 30 Nov 2008 17:09:47 +0000</pubDate>
		<guid isPermaLink="false">http://gen5.info/q/?p=36#comment-1720</guid>
		<description>@ecards,

   one advantage of an extension methods is that the original class doesn't have to be "partial;"  it can even be sealed.  You can also put extension methods on an interface or on an enum.

Extension methods were introduced to make LINQ possible:  LINQ adds a large number of extension methods to classes that implement collection interfaces.</description>
		<content:encoded><![CDATA[<p>@ecards,</p>
<p>   one advantage of an extension methods is that the original class doesn&#8217;t have to be &#8220;partial;&#8221;  it can even be sealed.  You can also put extension methods on an interface or on an enum.</p>
<p>Extension methods were introduced to make LINQ possible:  LINQ adds a large number of extension methods to classes that implement collection interfaces.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ecards</title>
		<link>http://gen5.info/q/2008/07/03/extension-methods-nulls-namespaces-and-precedence-in-c/comment-page-1/#comment-1582</link>
		<dc:creator>ecards</dc:creator>
		<pubDate>Fri, 21 Nov 2008 02:26:54 +0000</pubDate>
		<guid isPermaLink="false">http://gen5.info/q/?p=36#comment-1582</guid>
		<description>Nice article.  But what I'm not clear on is what's the difference between:
  1) adding an extension method foobar for class A
  2) adding a method foobar to a partial class A

I get the semantic differences like null checking, but there must be a more fundamental difference i'm missing...</description>
		<content:encoded><![CDATA[<p>Nice article.  But what I&#8217;m not clear on is what&#8217;s the difference between:<br />
  1) adding an extension method foobar for class A<br />
  2) adding a method foobar to a partial class A</p>
<p>I get the semantic differences like null checking, but there must be a more fundamental difference i&#8217;m missing&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kaveh Shahbazian</title>
		<link>http://gen5.info/q/2008/07/03/extension-methods-nulls-namespaces-and-precedence-in-c/comment-page-1/#comment-565</link>
		<dc:creator>Kaveh Shahbazian</dc:creator>
		<pubDate>Wed, 09 Jul 2008 22:08:47 +0000</pubDate>
		<guid isPermaLink="false">http://gen5.info/q/?p=36#comment-565</guid>
		<description>I have found even crazier uses for extension methods (http://hcoding.blogspot.com/2008/07/foop.html)!
I think separating the namespace for extension methods is enough for working safely with them.
And the current design of extension methods is just for being usable in C# 2; that static class is totally un-necessary.</description>
		<content:encoded><![CDATA[<p>I have found even crazier uses for extension methods (http://hcoding.blogspot.com/2008/07/foop.html)!<br />
I think separating the namespace for extension methods is enough for working safely with them.<br />
And the current design of extension methods is just for being usable in C# 2; that static class is totally un-necessary.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason Olson</title>
		<link>http://gen5.info/q/2008/07/03/extension-methods-nulls-namespaces-and-precedence-in-c/comment-page-1/#comment-564</link>
		<dc:creator>Jason Olson</dc:creator>
		<pubDate>Wed, 09 Jul 2008 18:20:29 +0000</pubDate>
		<guid isPermaLink="false">http://gen5.info/q/?p=36#comment-564</guid>
		<description>I think the concerns behind "writing bad code" being enabled by extension methods is the same concern that arrived with the introduction of partial classes. Yes, they can be abused, but they are also tremendously useful.

There are two current reasons why I love extension methods: 1) enabling of fluent interfaces built on top of a "normal" canonical API and 2) a "poor man's" .NET version of monkey-patching from the Ruby world. So, for unit testing frameworks, instead of having code like "Assert.Equal(foo, bar);", I could have "foo.ShouldEqual(bar);" instead due to an extension method on object.</description>
		<content:encoded><![CDATA[<p>I think the concerns behind &#8220;writing bad code&#8221; being enabled by extension methods is the same concern that arrived with the introduction of partial classes. Yes, they can be abused, but they are also tremendously useful.</p>
<p>There are two current reasons why I love extension methods: 1) enabling of fluent interfaces built on top of a &#8220;normal&#8221; canonical API and 2) a &#8220;poor man&#8217;s&#8221; .NET version of monkey-patching from the Ruby world. So, for unit testing frameworks, instead of having code like &#8220;Assert.Equal(foo, bar);&#8221;, I could have &#8220;foo.ShouldEqual(bar);&#8221; instead due to an extension method on object.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://gen5.info/q/2008/07/03/extension-methods-nulls-namespaces-and-precedence-in-c/comment-page-1/#comment-563</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Wed, 09 Jul 2008 14:19:52 +0000</pubDate>
		<guid isPermaLink="false">http://gen5.info/q/?p=36#comment-563</guid>
		<description>@Will,

    I'm with you.  In my viewpoint,  "sugar" is pretty important.  Programmers spend a lot of our days doing little tasks again and again -- out of the box APIs often mean that we need to use 5 lines of code to do one line worth of work the 'obvious' way,  and that we need 15 to do it the correct way.

    Extension methods are a great way to codify correct practices and put them on our fingertips -- so it's easier to do things right than to do things wrong.</description>
		<content:encoded><![CDATA[<p>@Will,</p>
<p>    I&#8217;m with you.  In my viewpoint,  &#8220;sugar&#8221; is pretty important.  Programmers spend a lot of our days doing little tasks again and again &#8212; out of the box APIs often mean that we need to use 5 lines of code to do one line worth of work the &#8216;obvious&#8217; way,  and that we need 15 to do it the correct way.</p>
<p>    Extension methods are a great way to codify correct practices and put them on our fingertips &#8212; so it&#8217;s easier to do things right than to do things wrong.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: superjason</title>
		<link>http://gen5.info/q/2008/07/03/extension-methods-nulls-namespaces-and-precedence-in-c/comment-page-1/#comment-562</link>
		<dc:creator>superjason</dc:creator>
		<pubDate>Wed, 09 Jul 2008 12:18:31 +0000</pubDate>
		<guid isPermaLink="false">http://gen5.info/q/?p=36#comment-562</guid>
		<description>I wasn't aware of these. Thanks for putting this together.</description>
		<content:encoded><![CDATA[<p>I wasn&#8217;t aware of these. Thanks for putting this together.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Will</title>
		<link>http://gen5.info/q/2008/07/03/extension-methods-nulls-namespaces-and-precedence-in-c/comment-page-1/#comment-561</link>
		<dc:creator>Will</dc:creator>
		<pubDate>Wed, 09 Jul 2008 11:51:54 +0000</pubDate>
		<guid isPermaLink="false">http://gen5.info/q/?p=36#comment-561</guid>
		<description>I was reserved at first, because I was concerned that people would use extension methods for business logic rather than sugar.  I haven't seen any examples of this kind of abuse yet, but I'm sure somebody is doing it somewhere.

Extension methods:  Good for sugar, bad for logic.</description>
		<content:encoded><![CDATA[<p>I was reserved at first, because I was concerned that people would use extension methods for business logic rather than sugar.  I haven&#8217;t seen any examples of this kind of abuse yet, but I&#8217;m sure somebody is doing it somewhere.</p>
<p>Extension methods:  Good for sugar, bad for logic.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
