<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>let x=x &#187; polymorphism</title>
	<atom:link href="http://www.crazymcphee.net/x/tag/polymorphism/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.crazymcphee.net/x</link>
	<description>programming idiom and methodology</description>
	<lastBuildDate>Wed, 11 Aug 2010 01:13:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Inherit this!</title>
		<link>http://www.crazymcphee.net/x/2009/01/18/inherit-this/</link>
		<comments>http://www.crazymcphee.net/x/2009/01/18/inherit-this/#comments</comments>
		<pubDate>Sat, 17 Jan 2009 21:15:26 +0000</pubDate>
		<dc:creator>Scot Mcphee</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[composition]]></category>
		<category><![CDATA[inheritance]]></category>
		<category><![CDATA[oo]]></category>
		<category><![CDATA[polymorphism]]></category>

		<guid isPermaLink="false">http://www.crazymcphee.net/x/?p=57</guid>
		<description><![CDATA[Extends is the most misused keyword in the Java lexicon. In my constant and probably losing battle against poor design, I keep finding systems with a rather rich abundance of implementation inheritance. I&#8217;ve actually recently seen systems with seven or more  levels of inheritance, where just about every object extends some class that (eventually) extends [...]]]></description>
			<content:encoded><![CDATA[<p><em>Extends</em> is the most misused keyword in the Java lexicon.</p>
<p>In my constant and probably losing battle against poor design, I keep finding systems with a rather rich abundance of implementation inheritance. I&#8217;ve actually recently seen systems with seven or more  levels of inheritance, where just about every object extends some class that (eventually) extends <span style="color: #000000;">AbstractBaseObject</span> extends BaseObject. All classes. No interfaces (unless some specification demands them), or sometimes, no interfaces with any methods declared.</p>
<p>I think if I had my way, I&#8217;d remove the extends keyword from Java and only leave implements. I guess it&#8217;s just a polemical fantasy of mine but there&#8217;s plenty or programmers out there still implementing the worst sort of bad juju with extension.</p>
<p>As <a title="Inheritance is not the way to achieve code reuse" href="http://littletutorials.com/2008/06/23/inheritance-not-for-code-reuse/" target="_blank">this post rightly points out</a> &#8211; the <em>purpose</em> (as opposed to a <em>side-effec</em>t) of extension is not to enable re-use. Extension is a declaration of a classification system in your domain. <em>Is-A</em> as opposed to <em>Has-A</em>. A Canine is-a Mammal which has-a Placenta. It&#8217;s not called a <em>type system</em> for nothing, you know. You&#8217;re making a <em>taxonomy.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.crazymcphee.net/x/2009/01/18/inherit-this/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
