<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Extensively using extension methods</title>
	<atom:link href="http://ajdotnet.wordpress.com/2008/02/10/extensively-using-extension-methods/feed/" rel="self" type="application/rss+xml" />
	<link>http://ajdotnet.wordpress.com/2008/02/10/extensively-using-extension-methods/</link>
	<description>Thoughts and informations I think worthwhile to share...</description>
	<lastBuildDate>Fri, 18 Sep 2009 01:42:12 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: ajdotnet</title>
		<link>http://ajdotnet.wordpress.com/2008/02/10/extensively-using-extension-methods/#comment-8011</link>
		<dc:creator>ajdotnet</dc:creator>
		<pubDate>Fri, 07 Mar 2008 06:24:53 +0000</pubDate>
		<guid isPermaLink="false">http://ajdotnet.wordpress.com/?p=153#comment-8011</guid>
		<description>@Vitaly: I have no idea. I suggest keeping an eye on the C# tem member blogs (see http://msdn2.microsoft.com/en-us/vcsharp/default.aspx ).</description>
		<content:encoded><![CDATA[<p>@Vitaly: I have no idea. I suggest keeping an eye on the C# tem member blogs (see <a href="http://msdn2.microsoft.com/en-us/vcsharp/default.aspx" rel="nofollow">http://msdn2.microsoft.com/en-us/vcsharp/default.aspx</a> ).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vitaly</title>
		<link>http://ajdotnet.wordpress.com/2008/02/10/extensively-using-extension-methods/#comment-8009</link>
		<dc:creator>Vitaly</dc:creator>
		<pubDate>Thu, 06 Mar 2008 19:30:30 +0000</pubDate>
		<guid isPermaLink="false">http://ajdotnet.wordpress.com/?p=153#comment-8009</guid>
		<description>Hi,

Do you know if static extension method will be included in C# 4?</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>Do you know if static extension method will be included in C# 4?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ajdotnet</title>
		<link>http://ajdotnet.wordpress.com/2008/02/10/extensively-using-extension-methods/#comment-8006</link>
		<dc:creator>ajdotnet</dc:creator>
		<pubDate>Wed, 27 Feb 2008 19:09:54 +0000</pubDate>
		<guid isPermaLink="false">http://ajdotnet.wordpress.com/?p=153#comment-8006</guid>
		<description>@Dan: You can use extension methods on &#039;this&#039; just like any other extension method called via any other instance:
- set a reference to the assembly that contains the extension method
- add the necessary using directive 
- use it

There is really no difference between &#039;this&#039; and a variable here and you could allways substitute the &#039;this&#039; reference:
MyClass x= this;
x.MyExtensionMethod

HIH,
AJ.NET</description>
		<content:encoded><![CDATA[<p>@Dan: You can use extension methods on &#8216;this&#8217; just like any other extension method called via any other instance:<br />
- set a reference to the assembly that contains the extension method<br />
- add the necessary using directive<br />
- use it</p>
<p>There is really no difference between &#8216;this&#8217; and a variable here and you could allways substitute the &#8216;this&#8217; reference:<br />
MyClass x= this;<br />
x.MyExtensionMethod</p>
<p>HIH,<br />
AJ.NET</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan</title>
		<link>http://ajdotnet.wordpress.com/2008/02/10/extensively-using-extension-methods/#comment-8005</link>
		<dc:creator>Dan</dc:creator>
		<pubDate>Wed, 27 Feb 2008 09:16:26 +0000</pubDate>
		<guid isPermaLink="false">http://ajdotnet.wordpress.com/?p=153#comment-8005</guid>
		<description>RE 2:
How do you compile 

this.MyExtensionMethod 

if MyExtensionMethod is in a different compilation unit that the class itself?</description>
		<content:encoded><![CDATA[<p>RE 2:<br />
How do you compile </p>
<p>this.MyExtensionMethod </p>
<p>if MyExtensionMethod is in a different compilation unit that the class itself?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ajdotnet</title>
		<link>http://ajdotnet.wordpress.com/2008/02/10/extensively-using-extension-methods/#comment-8004</link>
		<dc:creator>ajdotnet</dc:creator>
		<pubDate>Tue, 26 Feb 2008 20:27:32 +0000</pubDate>
		<guid isPermaLink="false">http://ajdotnet.wordpress.com/?p=153#comment-8004</guid>
		<description>@Dan: This post was all about technobabble (the high-level view is still under construction)... ;-)

1. Regarding OO-principles: One could also argue that extension methods actually support the information hiding principle (one of the tenets of OO) as they allow keeping the data type restricted to the necessary core. Anyway, my opinion is that they&#039;ve simply got nothing to do with OO. They are an orthogonal means like properties, events, delegates.

2. extension methods have to be called via an instance, and &#039;this&#039; is just one special case. However, that&#039;s got nothing to do with the compilation unit, rather extension methods can reside in any referenced assembly.

3. I guess extension methods are just like any other new language feature. We had to learn how to use virtual methods, templates, interfaces, now we have to learn how to use extension methods.

4. &#039;var&#039; is about type inference and an integral feature of functional languages. Have a look at http://msdn.microsoft.com/msdnmag/issues/08/LA/FSharpIntro/default.aspx for some additional use cases.

HIH,
AJ.NET</description>
		<content:encoded><![CDATA[<p>@Dan: This post was all about technobabble (the high-level view is still under construction)&#8230; <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>1. Regarding OO-principles: One could also argue that extension methods actually support the information hiding principle (one of the tenets of OO) as they allow keeping the data type restricted to the necessary core. Anyway, my opinion is that they&#8217;ve simply got nothing to do with OO. They are an orthogonal means like properties, events, delegates.</p>
<p>2. extension methods have to be called via an instance, and &#8216;this&#8217; is just one special case. However, that&#8217;s got nothing to do with the compilation unit, rather extension methods can reside in any referenced assembly.</p>
<p>3. I guess extension methods are just like any other new language feature. We had to learn how to use virtual methods, templates, interfaces, now we have to learn how to use extension methods.</p>
<p>4. &#8216;var&#8217; is about type inference and an integral feature of functional languages. Have a look at <a href="http://msdn.microsoft.com/msdnmag/issues/08/LA/FSharpIntro/default.aspx" rel="nofollow">http://msdn.microsoft.com/msdnmag/issues/08/LA/FSharpIntro/default.aspx</a> for some additional use cases.</p>
<p>HIH,<br />
AJ.NET</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan</title>
		<link>http://ajdotnet.wordpress.com/2008/02/10/extensively-using-extension-methods/#comment-8003</link>
		<dc:creator>Dan</dc:creator>
		<pubDate>Tue, 26 Feb 2008 15:19:04 +0000</pubDate>
		<guid isPermaLink="false">http://ajdotnet.wordpress.com/?p=153#comment-8003</guid>
		<description>One question, besides all this technobabble:

Don&#039;t extension methods violate OO-principles? I mean, a member looks like a member, but isn&#039;t? It can&#039;t see the internals of the type. It behaves different. I would long for better aggregation or delegation mechanisms.

And what is the beef of calling an extension using this? Doesn&#039;t that mean both must reside in the same compilation unit? Why use an extension in that case?

I understand that LINQ needs extension methods. For anything else somebody has to make a very good point to me before I use them (I tried it in one project. It had the word disaster written all over it). If you try to factor your code better with them, forget it.


About the same verdict as for type inference using var: extremely useful for LINQ (which would be unusable without var). Can&#039;t see any usecase for non-LINQ-use.</description>
		<content:encoded><![CDATA[<p>One question, besides all this technobabble:</p>
<p>Don&#8217;t extension methods violate OO-principles? I mean, a member looks like a member, but isn&#8217;t? It can&#8217;t see the internals of the type. It behaves different. I would long for better aggregation or delegation mechanisms.</p>
<p>And what is the beef of calling an extension using this? Doesn&#8217;t that mean both must reside in the same compilation unit? Why use an extension in that case?</p>
<p>I understand that LINQ needs extension methods. For anything else somebody has to make a very good point to me before I use them (I tried it in one project. It had the word disaster written all over it). If you try to factor your code better with them, forget it.</p>
<p>About the same verdict as for type inference using var: extremely useful for LINQ (which would be unusable without var). Can&#8217;t see any usecase for non-LINQ-use.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
