<?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: C#: Using virtual leads to confusion?</title>
	<atom:link href="http://www.markhneedham.com/blog/2009/05/06/c-using-virtual-leads-to-confusion/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.markhneedham.com/blog/2009/05/06/c-using-virtual-leads-to-confusion/</link>
	<description>Thoughts on Software Development</description>
	<lastBuildDate>Wed, 17 Mar 2010 23:38:45 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Carlo</title>
		<link>http://www.markhneedham.com/blog/2009/05/06/c-using-virtual-leads-to-confusion/comment-page-1/#comment-16374</link>
		<dc:creator>Carlo</dc:creator>
		<pubDate>Thu, 07 May 2009 19:42:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.markhneedham.com/blog/?p=1201#comment-16374</guid>
		<description>I see where you&#039;re going with that. My take is that as long as there isn&#039;t lots of behaviour then the base class referencing subclasses isn&#039;t an issue.</description>
		<content:encoded><![CDATA[<p>I see where you're going with that. My take is that as long as there isn't lots of behaviour then the base class referencing subclasses isn't an issue.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Brackett</title>
		<link>http://www.markhneedham.com/blog/2009/05/06/c-using-virtual-leads-to-confusion/comment-page-1/#comment-16364</link>
		<dc:creator>Mark Brackett</dc:creator>
		<pubDate>Thu, 07 May 2009 16:35:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.markhneedham.com/blog/?p=1201#comment-16364</guid>
		<description>I think I&#039;d word this argument more along the lines of &quot;making RedirectToErrorPage = true by default is bound to cause confusion when you inherit the same class for both errors and successes&quot;. Not anywhere as catchy, but highlights the real problem AFAIC.

In other words - why would a ResponseStatus (1) care whether your UI redirects to an error page, and (2) default to true?</description>
		<content:encoded><![CDATA[<p>I think I'd word this argument more along the lines of "making RedirectToErrorPage = true by default is bound to cause confusion when you inherit the same class for both errors and successes". Not anywhere as catchy, but highlights the real problem AFAIC.</p>
<p>In other words &#8211; why would a ResponseStatus (1) care whether your UI redirects to an error page, and (2) default to true?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rob Scott</title>
		<link>http://www.markhneedham.com/blog/2009/05/06/c-using-virtual-leads-to-confusion/comment-page-1/#comment-16356</link>
		<dc:creator>Rob Scott</dc:creator>
		<pubDate>Thu, 07 May 2009 14:36:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.markhneedham.com/blog/?p=1201#comment-16356</guid>
		<description>I&#039;m pretty sure that a better title might have been &quot;Deriving from concrete class causes confusion&quot;.  It&#039;s long been recognized that deriving from concrete classes is problematic.  For a C++ version of the argument see Scott Meyers &quot;More Effective C++&quot;, Item 33.</description>
		<content:encoded><![CDATA[<p>I'm pretty sure that a better title might have been "Deriving from concrete class causes confusion".  It's long been recognized that deriving from concrete classes is problematic.  For a C++ version of the argument see Scott Meyers "More Effective C++", Item 33.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Needham</title>
		<link>http://www.markhneedham.com/blog/2009/05/06/c-using-virtual-leads-to-confusion/comment-page-1/#comment-16341</link>
		<dc:creator>Mark Needham</dc:creator>
		<pubDate>Thu, 07 May 2009 08:27:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.markhneedham.com/blog/?p=1201#comment-16341</guid>
		<description>@Carlo yeh it&#039;s definitely still inheritance - that was supposed to be a more general comment about where the virtual key word might be useful. 

I&#039;m not sure, maybe it is. The idea was to only use the objects like:

ResponseStatus.UnrecoverableError or ResponseStatus.TransactionSuccessful so I&#039;m not sure if it&#039;s quite so bad or not?</description>
		<content:encoded><![CDATA[<p>@Carlo yeh it's definitely still inheritance &#8211; that was supposed to be a more general comment about where the virtual key word might be useful. </p>
<p>I'm not sure, maybe it is. The idea was to only use the objects like:</p>
<p>ResponseStatus.UnrecoverableError or ResponseStatus.TransactionSuccessful so I'm not sure if it's quite so bad or not?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Carlo</title>
		<link>http://www.markhneedham.com/blog/2009/05/06/c-using-virtual-leads-to-confusion/comment-page-1/#comment-16340</link>
		<dc:creator>Carlo</dc:creator>
		<pubDate>Thu, 07 May 2009 08:20:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.markhneedham.com/blog/?p=1201#comment-16340</guid>
		<description>I can&#039;t see the composition behaviour above, it still is inheritance...

Isn&#039;t it also bad practice to let base classes know about their sub-classes i.e. The 2 static fields in the base class.</description>
		<content:encoded><![CDATA[<p>I can't see the composition behaviour above, it still is inheritance&#8230;</p>
<p>Isn't it also bad practice to let base classes know about their sub-classes i.e. The 2 static fields in the base class.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Reflective Perspective - Chris Alcock &#187; The Morning Brew #342</title>
		<link>http://www.markhneedham.com/blog/2009/05/06/c-using-virtual-leads-to-confusion/comment-page-1/#comment-16337</link>
		<dc:creator>Reflective Perspective - Chris Alcock &#187; The Morning Brew #342</dc:creator>
		<pubDate>Thu, 07 May 2009 07:38:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.markhneedham.com/blog/?p=1201#comment-16337</guid>
		<description>[...] C#: Using virtual leads to confusion? - Mark Needham looks at some code that caused confusion due to its structure, and looks at a clearer alternative. [...]</description>
		<content:encoded><![CDATA[<p>[...] C#: Using virtual leads to confusion? &#8211; Mark Needham looks at some code that caused confusion due to its structure, and looks at a clearer alternative. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: DotNetShoutout</title>
		<link>http://www.markhneedham.com/blog/2009/05/06/c-using-virtual-leads-to-confusion/comment-page-1/#comment-16291</link>
		<dc:creator>DotNetShoutout</dc:creator>
		<pubDate>Wed, 06 May 2009 18:14:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.markhneedham.com/blog/?p=1201#comment-16291</guid>
		<description>&lt;strong&gt;C#: Using virtual leads to confusion? at Mark Needham...&lt;/strong&gt;

Thank you for submitting this cool story - Trackback from DotNetShoutout...</description>
		<content:encoded><![CDATA[<p><strong>C#: Using virtual leads to confusion? at Mark Needham&#8230;</strong></p>
<p>Thank you for submitting this cool story &#8211; Trackback from DotNetShoutout&#8230;</p>
]]></content:encoded>
	</item>
</channel>
</rss>
