<?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 for Togaroga</title>
	<atom:link href="http://togaroga.com/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://togaroga.com</link>
	<description>Andrew Hare&#039;s coding blog</description>
	<lastBuildDate>Thu, 14 Apr 2011 13:45:43 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>Comment on Know your framework by Yogesh Kamble</title>
		<link>http://togaroga.com/2009/10/know-your-framework/comment-page-1/#comment-320</link>
		<dc:creator>Yogesh Kamble</dc:creator>
		<pubDate>Thu, 14 Apr 2011 13:45:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.togaroga.com/blog/?p=159#comment-320</guid>
		<description>&lt;p&gt;Nice Article .......&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Nice Article &#8230;&#8230;.</p>]]></content:encoded>
	</item>
	<item>
		<title>Comment on You don&#8217;t always need a lambda expression by Bones</title>
		<link>http://togaroga.com/2009/11/you-dont-always-need-a-lambda-expression/comment-page-1/#comment-319</link>
		<dc:creator>Bones</dc:creator>
		<pubDate>Wed, 13 Apr 2011 11:27:01 +0000</pubDate>
		<guid isPermaLink="false">http://togaroga.com/blog/?p=204#comment-319</guid>
		<description>&lt;p&gt;You&#039;ve hit the ball out the park! Icrndeible!&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>You&#8217;ve hit the ball out the park! Icrndeible!</p>]]></content:encoded>
	</item>
	<item>
		<title>Comment on Two structural additions to C# by Micheal</title>
		<link>http://togaroga.com/2010/04/two-structural-additions-to-c/comment-page-1/#comment-318</link>
		<dc:creator>Micheal</dc:creator>
		<pubDate>Wed, 13 Apr 2011 05:07:09 +0000</pubDate>
		<guid isPermaLink="false">http://togaroga.com/?p=624#comment-318</guid>
		<description>&lt;p&gt;Stands back from the kybeorad in amazement! Thanks!&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Stands back from the kybeorad in amazement! Thanks!</p>]]></content:encoded>
	</item>
	<item>
		<title>Comment on Choosy developers choose interfaces by Choosy developers choose interfaces</title>
		<link>http://togaroga.com/2010/04/choosy-developers-choose-interfaces/comment-page-1/#comment-274</link>
		<dc:creator>Choosy developers choose interfaces</dc:creator>
		<pubDate>Thu, 09 Dec 2010 07:37:37 +0000</pubDate>
		<guid isPermaLink="false">http://togaroga.com/blog/?p=297#comment-274</guid>
		<description>&lt;p&gt;[...] unnecessary restrictions on the caller of the method that requires them to pass too specific of...  [full post]    Andrew     Andrew Hare&#039;s Blog   codebest-practicec#interfaces            0        0        0     [...]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>[...] unnecessary restrictions on the caller of the method that requires them to pass too specific of&#8230;  [full post]    Andrew     Andrew Hare&#039;s Blog   codebest-practicec#interfaces            0        0        0     [...]</p>]]></content:encoded>
	</item>
	<item>
		<title>Comment on Overload resolution puzzler by spender</title>
		<link>http://togaroga.com/2010/11/overload-resolution-puzzler/comment-page-1/#comment-263</link>
		<dc:creator>spender</dc:creator>
		<pubDate>Wed, 24 Nov 2010 02:16:04 +0000</pubDate>
		<guid isPermaLink="false">http://togaroga.com/?p=711#comment-263</guid>
		<description>&lt;p&gt;More interesting is the resolution of:&lt;/p&gt;

&lt;p&gt;&lt;pre&gt;&lt;code&gt;Parent child = new Child();
child.Foo(&quot;test&quot;);
&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;

&lt;p&gt;You need to cover this for a comprehensive foray into the issue.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>More interesting is the resolution of:</p>

<p><pre><code>Parent child = new Child();
child.Foo("test");
</code></pre></p>

<p>You need to cover this for a comprehensive foray into the issue.</p>]]></content:encoded>
	</item>
	<item>
		<title>Comment on Overload resolution puzzler by Pepe</title>
		<link>http://togaroga.com/2010/11/overload-resolution-puzzler/comment-page-1/#comment-259</link>
		<dc:creator>Pepe</dc:creator>
		<pubDate>Mon, 08 Nov 2010 19:22:28 +0000</pubDate>
		<guid isPermaLink="false">http://togaroga.com/?p=711#comment-259</guid>
		<description>&lt;p&gt;I thought the obvious thing would indeed be that the program would print &quot;Child.Foo&quot;.  The resolver can&#039;t try to determine what the &quot;best&quot; method is based on parameter type, after all, what if the parent method was &quot;Parent.Foo(String a, Object b)&quot; and the child method was &quot;Child.Foo(Object a, String b)&quot;?  There would be no way to ever determine that one method matched a call better than the other simply by parameter types.&lt;/p&gt;

&lt;p&gt;So instead, for a given method call, the resolver instead looks through the class hierachy, starting with the object&#039;s class then UP-ward, and uses the first method that matches (even if some ancestor method might match &quot;better&quot;).   So child methods can indeed hide parent methods (I think the compiler will issue a warning when compiling the Child class).   A caller could type cast the child object to Parent when calling Foo in order to call Parent.Foo rather than Child.Foo.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I thought the obvious thing would indeed be that the program would print &#8220;Child.Foo&#8221;.  The resolver can&#8217;t try to determine what the &#8220;best&#8221; method is based on parameter type, after all, what if the parent method was &#8220;Parent.Foo(String a, Object b)&#8221; and the child method was &#8220;Child.Foo(Object a, String b)&#8221;?  There would be no way to ever determine that one method matched a call better than the other simply by parameter types.</p>

<p>So instead, for a given method call, the resolver instead looks through the class hierachy, starting with the object&#8217;s class then UP-ward, and uses the first method that matches (even if some ancestor method might match &#8220;better&#8221;).   So child methods can indeed hide parent methods (I think the compiler will issue a warning when compiling the Child class).   A caller could type cast the child object to Parent when calling Foo in order to call Parent.Foo rather than Child.Foo.</p>]]></content:encoded>
	</item>
	<item>
		<title>Comment on Overload resolution puzzler by o. nate</title>
		<link>http://togaroga.com/2010/11/overload-resolution-puzzler/comment-page-1/#comment-258</link>
		<dc:creator>o. nate</dc:creator>
		<pubDate>Mon, 08 Nov 2010 18:14:32 +0000</pubDate>
		<guid isPermaLink="false">http://togaroga.com/?p=711#comment-258</guid>
		<description>&lt;p&gt;This behavior may be by design, but I&#039;d argue it&#039;s a bad design.  For one thing, if you&#039;re worried that a base class might be trying to maliciously change the behavior of your program, then you have no right to be using that base class in the first place.  If a base class wanted to do something malicious, there are a lot of easier ways it could go about that without relying on this particular behavior - it could simply change some of the base class behavior that we do rely on, since presumably we are deriving from this base class for a reason.  So I think that&#039;s a false argument.  The more realistic argument is that the base class could &lt;em&gt;accidentally&lt;/em&gt; change some behavior of the derived class.  That is indeed a possible problem.  However, there is another possible problem which is just as bad - ie., that the derived class could accidentally change some behavior of the base class.  And the decision to implement overloading in this way actually makes it much more likely that just this situation could occur.  By implementing this in a counter-intuitive way, the language designers increase the probability that the derived class might override some base-class behavior that it meant to preserve.  So I&#039;d say that in the best case this is a net neutral - but since it is more counter-intuitive, I&#039;d call it a net negative.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>This behavior may be by design, but I&#8217;d argue it&#8217;s a bad design.  For one thing, if you&#8217;re worried that a base class might be trying to maliciously change the behavior of your program, then you have no right to be using that base class in the first place.  If a base class wanted to do something malicious, there are a lot of easier ways it could go about that without relying on this particular behavior &#8211; it could simply change some of the base class behavior that we do rely on, since presumably we are deriving from this base class for a reason.  So I think that&#8217;s a false argument.  The more realistic argument is that the base class could <em>accidentally</em> change some behavior of the derived class.  That is indeed a possible problem.  However, there is another possible problem which is just as bad &#8211; ie., that the derived class could accidentally change some behavior of the base class.  And the decision to implement overloading in this way actually makes it much more likely that just this situation could occur.  By implementing this in a counter-intuitive way, the language designers increase the probability that the derived class might override some base-class behavior that it meant to preserve.  So I&#8217;d say that in the best case this is a net neutral &#8211; but since it is more counter-intuitive, I&#8217;d call it a net negative.</p>]]></content:encoded>
	</item>
	<item>
		<title>Comment on Overload resolution puzzler by Andrew</title>
		<link>http://togaroga.com/2010/11/overload-resolution-puzzler/comment-page-1/#comment-256</link>
		<dc:creator>Andrew</dc:creator>
		<pubDate>Mon, 08 Nov 2010 17:14:32 +0000</pubDate>
		<guid isPermaLink="false">http://togaroga.com/?p=711#comment-256</guid>
		<description>&lt;p&gt;@Huh - Yes, you can &lt;em&gt;overload&lt;/em&gt; any method on a base class this way (not override - overriding a method is different).&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>@Huh &#8211; Yes, you can <em>overload</em> any method on a base class this way (not override &#8211; overriding a method is different).</p>]]></content:encoded>
	</item>
	<item>
		<title>Comment on Overload resolution puzzler by Huh</title>
		<link>http://togaroga.com/2010/11/overload-resolution-puzzler/comment-page-1/#comment-255</link>
		<dc:creator>Huh</dc:creator>
		<pubDate>Mon, 08 Nov 2010 16:51:32 +0000</pubDate>
		<guid isPermaLink="false">http://togaroga.com/?p=711#comment-255</guid>
		<description>&lt;p&gt;So this means that i can override ANY method, just by using object as parameter(s) and then casting it to whatever I&#039;d like inside the function?&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>So this means that i can override ANY method, just by using object as parameter(s) and then casting it to whatever I&#8217;d like inside the function?</p>]]></content:encoded>
	</item>
	<item>
		<title>Comment on Two structural additions to C# by Andrew</title>
		<link>http://togaroga.com/2010/04/two-structural-additions-to-c/comment-page-1/#comment-240</link>
		<dc:creator>Andrew</dc:creator>
		<pubDate>Wed, 09 Jun 2010 20:22:54 +0000</pubDate>
		<guid isPermaLink="false">http://togaroga.com/?p=624#comment-240</guid>
		<description>&lt;p&gt;That&#039;s an excellent question!  This concept would hopefully support all types, not just anonymous types.  That means that any type that is structurally equivalent would implicitly implement the interface.  This would be helpful with working with 3rd party types that don&#039;t implement interfaces that you wish they did.  As for anonymous types, they would never be able to implicitly implement any interface that had methods since anonymous types cannot be declared with methods.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>That&#8217;s an excellent question!  This concept would hopefully support all types, not just anonymous types.  That means that any type that is structurally equivalent would implicitly implement the interface.  This would be helpful with working with 3rd party types that don&#8217;t implement interfaces that you wish they did.  As for anonymous types, they would never be able to implicitly implement any interface that had methods since anonymous types cannot be declared with methods.</p>]]></content:encoded>
	</item>
</channel>
</rss>

