<?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: Generic Functions</title>
	<atom:link href="http://www.snell-pym.org.uk/archives/2009/08/18/generic-functions/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.snell-pym.org.uk/archives/2009/08/18/generic-functions/</link>
	<description>Sarah and Alaric Snell-Pym living in interesting times</description>
	<pubDate>Tue, 22 May 2012 23:44:29 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Peter Bex</title>
		<link>http://www.snell-pym.org.uk/archives/2009/08/18/generic-functions/comment-page-1/#comment-103580</link>
		<dc:creator>Peter Bex</dc:creator>
		<pubDate>Tue, 18 Aug 2009 14:15:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.snell-pym.org.uk/?p=1699#comment-103580</guid>
		<description>&lt;p&gt;I agree that generic functions are an interesting idea, but I think you've not given enough credit to prototype based systems, or "open class" systems like Ruby.&lt;/p&gt;

&lt;p&gt;In a prototype-based system you can manipulate any object as you please, so you can add new methods which become available to all clones of that object (unless the clone already overrides the method with its own).&lt;/p&gt;

&lt;p&gt;In the "open class" systems you can mix in any number of modules into any class you wish.&lt;/p&gt;

&lt;p&gt;Of course, with both systems you pay the same price as with generic functions; because everything is so open, it is hard to compile things efficiently because anything can happen at run-time.&lt;/p&gt;

&lt;p&gt;A more interesting question is; do generic methods get you into trouble as easily as mixins do? (the dreaded "monkey-patching" problems)&lt;/p&gt;

&lt;p&gt;I don't know if prototype systems can get you into these troubles so easy either, since I haven't done any big systems hacking with such an object system.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I agree that generic functions are an interesting idea, but I think you've not given enough credit to prototype based systems, or "open class" systems like Ruby.</p>

<p>In a prototype-based system you can manipulate any object as you please, so you can add new methods which become available to all clones of that object (unless the clone already overrides the method with its own).</p>

<p>In the "open class" systems you can mix in any number of modules into any class you wish.</p>

<p>Of course, with both systems you pay the same price as with generic functions; because everything is so open, it is hard to compile things efficiently because anything can happen at run-time.</p>

<p>A more interesting question is; do generic methods get you into trouble as easily as mixins do? (the dreaded "monkey-patching" problems)</p>

<p>I don't know if prototype systems can get you into these troubles so easy either, since I haven't done any big systems hacking with such an object system.</p>]]></content:encoded>
	</item>
</channel>
</rss>

