<?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: super is your friend</title>
	<atom:link href="http://blog.fallingsnow.net/2008/04/02/super-is-your-friend/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.fallingsnow.net/2008/04/02/super-is-your-friend/</link>
	<description>life and tech stuff by Evan Phoenix</description>
	<lastBuildDate>Sat, 29 Oct 2011 15:31:08 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Graeme Mathieson</title>
		<link>http://blog.fallingsnow.net/2008/04/02/super-is-your-friend/#comment-9965</link>
		<dc:creator><![CDATA[Graeme Mathieson]]></dc:creator>
		<pubDate>Fri, 25 Apr 2008 14:14:39 +0000</pubDate>
		<guid isPermaLink="false">http://evanphx.wordpress.com/?p=42#comment-9965</guid>
		<description><![CDATA[It gets better. &lt;code&gt;N&lt;/code&gt; is an ancestor of A, so you could do:

&lt;code&gt;class A &lt; B
  include N
  def go
    puts &quot;A#go&quot;
    super
  end
end&lt;/code&gt;

which will then print:

&lt;code&gt;irb(main):021:0&gt; A.new.go
A#go
N#go
B#go&lt;/code&gt;]]></description>
		<content:encoded><![CDATA[<p>It gets better. <code>N</code> is an ancestor of A, so you could do:</p>
<p><code>class A &lt; B<br />
  include N<br />
  def go<br />
    puts "A#go"<br />
    super<br />
  end<br />
end</code></p>
<p>which will then print:</p>
<p><code>irb(main):021:0&gt; A.new.go<br />
A#go<br />
N#go<br />
B#go</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Piers Cawley</title>
		<link>http://blog.fallingsnow.net/2008/04/02/super-is-your-friend/#comment-9729</link>
		<dc:creator><![CDATA[Piers Cawley]]></dc:creator>
		<pubDate>Thu, 03 Apr 2008 13:40:09 +0000</pubDate>
		<guid isPermaLink="false">http://evanphx.wordpress.com/?p=42#comment-9729</guid>
		<description><![CDATA[Hang on, this isn&#039;t a &#039;trick&#039; this one of the fundamental ideas of OO programming.]]></description>
		<content:encoded><![CDATA[<p>Hang on, this isn&#8217;t a &#8216;trick&#8217; this one of the fundamental ideas of OO programming.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brian Mitchell</title>
		<link>http://blog.fallingsnow.net/2008/04/02/super-is-your-friend/#comment-9722</link>
		<dc:creator><![CDATA[Brian Mitchell]]></dc:creator>
		<pubDate>Wed, 02 Apr 2008 16:23:21 +0000</pubDate>
		<guid isPermaLink="false">http://evanphx.wordpress.com/?p=42#comment-9722</guid>
		<description><![CDATA[Underused indeed.  I do avoid it in some cases where I don&#039;t want the module to be tightly coupled to the superclass&#039;s interface.  As you say, this is a good way to implement a &quot;plug-in&quot; module which is probably a case where you are working with a specific interface to beging with anyway.]]></description>
		<content:encoded><![CDATA[<p>Underused indeed.  I do avoid it in some cases where I don&#8217;t want the module to be tightly coupled to the superclass&#8217;s interface.  As you say, this is a good way to implement a &#8220;plug-in&#8221; module which is probably a case where you are working with a specific interface to beging with anyway.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Reg Braithwaite</title>
		<link>http://blog.fallingsnow.net/2008/04/02/super-is-your-friend/#comment-9721</link>
		<dc:creator><![CDATA[Reg Braithwaite]]></dc:creator>
		<pubDate>Wed, 02 Apr 2008 14:45:52 +0000</pubDate>
		<guid isPermaLink="false">http://evanphx.wordpress.com/?p=42#comment-9721</guid>
		<description><![CDATA[&quot;if N were included in B directly rather than A, N#go would never be called.&quot;

If wishes were horses then beggars would ride, as they say. But I have always wished that if you called super in a module that it would call the method in its including class. IOW, I have always wished that if class B includes N, you will still get N#go followed by B#go...]]></description>
		<content:encoded><![CDATA[<p>&#8220;if N were included in B directly rather than A, N#go would never be called.&#8221;</p>
<p>If wishes were horses then beggars would ride, as they say. But I have always wished that if you called super in a module that it would call the method in its including class. IOW, I have always wished that if class B includes N, you will still get N#go followed by B#go&#8230;</p>
]]></content:encoded>
	</item>
</channel>
</rss>

