<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
My collaboration is a name space for roles. An object can play
different roles in different collaborations, but I cannot have the same
role in different collaborations since the role is an attribute of the
collaboration. Roles in different collaborations can thus have the same
name without conflict. <br>
<br>
Anther question is the name space for traits/methods, and there may be
potential conflicts here.<br>
&nbsp;I am trying to get some kind of Browser with Traits, hoping that
experiments will clarify what I am talking about.<br>
<br>
Your example, "I am a Programmer in project p1, and also in&nbsp; project
p2.
" is unclear to me because I cannot see how it relates to system
behavior. It could mean that p1 and p2 are instances of the same class
and I do not see a problem. Alternatively, p1 and p2 could be instances
of different classes with different features. In that case, the example
sounds to me like part of a conceptual schema; i.e., a description of
system state. <br>
<br>
I use different paradigms for coding system state and system behavior.
I code system state as an ensemble of classes with their attributes and
associations. I code system behavior as a collaboration with its
associated methods for each system operation (use case). Traits seem
promising for coding system behavior as stateless methods within a
collaboration.<br>
<br>
Cheers<br>
--Trygve<br>
<br>
On 19.02.2008 19:29, itsme213 wrote:
<blockquote cite="mid:fpf76t$m6j$1@ger.gmane.org" type="cite">
  <pre wrap="">"Trygve Reenskaug" <a class="moz-txt-link-rfc2396E" href="mailto:trygver@ifi.uio.no">&lt;trygver@ifi.uio.no&gt;</a> wrote in message

btw, I get various errors loading BabySRE in Squeak 3.9.

  </pre>
  <blockquote type="cite">
    <pre wrap="">My next step is to code the methods as Traits, thereby further loosening
the binding between role and object/class.
    </pre>
  </blockquote>
  <pre wrap=""><!---->
I wonder how far Traits can help. An object can play the same role in two 
different collaborations e.g. I am a Programmer in project p1, and also in 
project p2. One would like to apply the same Programmer trait twice, with 
the option of having separate (class-based) state for each of p1 and p2. I 
don't think this is possible with Traits.

Traits use unimplemented self-calls as "required methods" to (among other 
things) access such state. However, you cannot parameterize these required 
methods (you can rename provided methods, but not required methods which 
would need some kind of automatic code generation/re-writing of intermediate 
traits).

I am hoping to get Damien's or Stephane's insights on this. 
<a class="moz-txt-link-freetext" href="http://www.nabble.com/A-Traits-question-td15484148.html">http://www.nabble.com/A-Traits-question-td15484148.html</a>

Do you think you will hit this limitation? Or does your intended usage avoid 
this issue?

Thanks!

Sophie 





  </pre>
</blockquote>
<br>
<div class="moz-signature">-- <br>
<meta http-equiv="Content-Type" content="text/html; ">
<meta name="ProgId" content="Word.Document">
<meta name="Generator" content="Microsoft Word 10">
<meta name="Originator" content="Microsoft Word 10">
<link rel="File-List" href="TrygveSignature-filer/filelist.xml">
<title>-- </title>
<!--[if gte mso 9]><xml>
 <w:WordDocument>
  <w:SpellingState>Clean</w:SpellingState>
  <w:GrammarState>Clean</w:GrammarState>
  <w:HyphenationZone>21</w:HyphenationZone>
  <w:PunctuationKerning/>
  <w:DrawingGridHorizontalSpacing>6 pt</w:DrawingGridHorizontalSpacing>
  <w:DrawingGridVerticalSpacing>6 pt</w:DrawingGridVerticalSpacing>
  <w:DisplayHorizontalDrawingGridEvery>0</w:DisplayHorizontalDrawingGridEvery>
  <w:DisplayVerticalDrawingGridEvery>3</w:DisplayVerticalDrawingGridEvery>
  <w:UseMarginsForDrawingGridOrigin/>
  <w:DoNotShadeFormData/>
  <w:Compatibility>
   <w:FootnoteLayoutLikeWW8/>
   <w:ShapeLayoutLikeWW8/>
   <w:AlignTablesRowByRow/>
   <w:ForgetLastTabAlignment/>
   <w:LayoutRawTableWidth/>
   <w:LayoutTableRowsApart/>
   <w:UseWord97LineBreakingRules/>
  </w:Compatibility>
  <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
 </w:WordDocument>
</xml><![endif]-->
<style>
<!--
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {mso-style-parent:"";
        margin:0cm;
        margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:12.0pt;
        font-family:"Times New Roman";
        mso-fareast-font-family:"Times New Roman";}
span.SpellE
        {mso-style-name:"";
        mso-spl-e:yes;}
span.GramE
        {mso-style-name:"";
        mso-gram-e:yes;}
 /* Page Definitions */
 @page
        {mso-page-border-surround-header:no;
        mso-page-border-surround-footer:no;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;
        mso-header-margin:35.4pt;
        mso-footer-margin:35.4pt;
        mso-paper-source:0;}
div.Section1
        {page:Section1;}
-->
</style><!--[if gte mso 10]>
<style>
 /* Style Definitions */
 table.MsoNormalTable
        {mso-style-name:"Vanlig tabell";
        mso-tstyle-rowband-size:0;
        mso-tstyle-colband-size:0;
        mso-style-noshow:yes;
        mso-style-parent:"";
        mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
        mso-para-margin:0cm;
        mso-para-margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:10.0pt;
        font-family:"Times New Roman";}
</style>
<![endif]--><!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="2050"/>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1"/>
 </o:shapelayout></xml><![endif]-->
<div class="Section1">
<p class="MsoNormal" style=""><span class="SpellE"><span
 style="font-size: 10pt; font-family: Arial;" lang="EN-GB">Trygve</span></span><span
 style="font-size: 10pt; font-family: Arial;" lang="EN-GB">
Reenskaug<span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>mailto: <span class="SpellE"><a class="moz-txt-link-abbreviated" href="mailto:trygver@ifi.uio.no">trygver@ifi.uio.no</a></span></span><span
 style="font-size: 10pt; font-family: Arial;"><o:p></o:p></span></p>
<p class="MsoNormal" style=""><span class="SpellE"><span class="GramE"><span
 style="font-size: 10pt; font-family: Arial;" lang="EN-GB">Morgedalsvn</span></span></span><span
 class="GramE"><span style="font-size: 10pt; font-family: Arial;"
 lang="EN-GB">.</span></span><span
 style="font-size: 10pt; font-family: Arial;" lang="EN-GB"> 5A <span
 style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><a class="moz-txt-link-freetext" href="http://heim.ifi.uio.no/~trygver">http://heim.ifi.uio.no/~trygver</a><o:p></o:p></span></p>
<p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: Arial;">N-0378
Oslo<span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Tel: (+47) 22 49 57 27<o:p></o:p></span></p>
<p class="MsoNormal" style=""><span class="SpellE"><span
 style="font-size: 10pt; font-family: Arial;">Norway</span></span><span
 style="font-size: 10pt; font-family: Arial;"><o:p></o:p></span></p>
</div>
</div>
</body>
</html>