<?xml version="1.0" encoding="windows-1252"?>
<node id="727212" title="Re^2: Roles and functional programming" created="2008-12-01 15:43:08" updated="2008-12-01 15:43:08">
<type id="11">
note</type>
<author id="85580">
dragonchild</author>
<data>
<field name="doctext">
Roles don't -have- attributes. Roles can -provide- attributes to the classes they are composed into. If you have a Cat and Dog, each of which does Pet, then if you have a $cat instance and a $dog instance, the $.collar attribute of each is separate. They aren't shared in any sense. Therefore, Perl6 roles -are- stateless in that the role itself doesn't have any state. (Which makes sense given that you cannot instantiate a role.)
&lt;!-- Node text goes above. Div tags should contain sig only --&gt;
&lt;div class="pmsig"&gt;&lt;div class="pmsig-85580"&gt;
&lt;hr&gt;
My criteria for good software:
&lt;ol&gt;
&lt;li&gt;Does it work?
&lt;li&gt;Can someone else come in, make a change, and be reasonably certain no bugs were introduced?
&lt;/ol&gt;
&lt;/div&gt;&lt;/div&gt;</field>
<field name="root_node">
726126</field>
<field name="parent_node">
726148</field>
</data>
</node>
