<?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: Durations vs Roles</title>
	<atom:link href="http://justrakudoit.wordpress.com/2010/09/30/195/feed/" rel="self" type="application/rss+xml" />
	<link>http://justrakudoit.wordpress.com/2010/09/30/195/</link>
	<description>I Never Metaop I Didn&#039;t Like</description>
	<lastBuildDate>Thu, 07 Mar 2013 12:58:07 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: mathw</title>
		<link>http://justrakudoit.wordpress.com/2010/09/30/195/#comment-2436</link>
		<dc:creator><![CDATA[mathw]]></dc:creator>
		<pubDate>Thu, 30 Sep 2010 07:38:28 +0000</pubDate>
		<guid isPermaLink="false">http://justrakudoit.wordpress.com/?p=195#comment-2436</guid>
		<description><![CDATA[What you&#039;re doing there is actually creating a new class on the fly which has the role composed into it (and contains nothing else), and then making a new object of that class immediately. I don&#039;t think it&#039;s the kind of thing you can then seamlessly merge into an instance of another class which composes the same role.

Which I suspect is why the .perl comes out wrong, although it should probably manage to be smarter than that.

But I think the correct pattern here might be having a Duration object which then becomes a member of the thing which has a duration. I did once come across a genuine use for roles, but I was coding in C++ so I had to use multiple inheritance instead. I know people are using them with Moose, but personally I have no idea of the patterns involved.]]></description>
		<content:encoded><![CDATA[<p>What you&#8217;re doing there is actually creating a new class on the fly which has the role composed into it (and contains nothing else), and then making a new object of that class immediately. I don&#8217;t think it&#8217;s the kind of thing you can then seamlessly merge into an instance of another class which composes the same role.</p>
<p>Which I suspect is why the .perl comes out wrong, although it should probably manage to be smarter than that.</p>
<p>But I think the correct pattern here might be having a Duration object which then becomes a member of the thing which has a duration. I did once come across a genuine use for roles, but I was coding in C++ so I had to use multiple inheritance instead. I know people are using them with Moose, but personally I have no idea of the patterns involved.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Benabik</title>
		<link>http://justrakudoit.wordpress.com/2010/09/30/195/#comment-2434</link>
		<dc:creator><![CDATA[Benabik]]></dc:creator>
		<pubDate>Thu, 30 Sep 2010 03:42:33 +0000</pubDate>
		<guid isPermaLink="false">http://justrakudoit.wordpress.com/?p=195#comment-2434</guid>
		<description><![CDATA[According to S12...

role Duration {...}
my $x = Duration.new

...is the same as...

role Duration {...}
class Duration does Duration {...}
my $x = Duration.new

I quote from S12-objects.pod:

When the typename happens to be a role, autovivifying it involves
attempting to create a punned class of the same name as the role.
Whether this succeeds or not depends on whether the role is
sufficiently complete to serve as a class on its own.]]></description>
		<content:encoded><![CDATA[<p>According to S12&#8230;</p>
<p>role Duration {&#8230;}<br />
my $x = Duration.new</p>
<p>&#8230;is the same as&#8230;</p>
<p>role Duration {&#8230;}<br />
class Duration does Duration {&#8230;}<br />
my $x = Duration.new</p>
<p>I quote from S12-objects.pod:</p>
<p>When the typename happens to be a role, autovivifying it involves<br />
attempting to create a punned class of the same name as the role.<br />
Whether this succeeds or not depends on whether the role is<br />
sufficiently complete to serve as a class on its own.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
