<!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">
On 14.05.2008 16:41, Andreas Raab wrote:
<blockquote cite="mid:482AFA15.3050703@gmx.de" type="cite">itsme213
wrote:
  <br>
  <blockquote type="cite">"Andreas Raab" <a class="moz-txt-link-rfc2396E" href="mailto:andreas.raab@gmx.de">&lt;andreas.raab@gmx.de&gt;</a>
wrote in
    <br>
    <blockquote type="cite">Trygve Reenskaug wrote:
      <br>
      <blockquote type="cite">A role is played by an object at run
time. This object can be an instance of any class that implements its
trait. So the trait is tied to a fundamental abstraction that is on the
same level as the class.
        <br>
      </blockquote>
Interesting. But aren't you describing interfaces?
      <br>
    </blockquote>
    <br>
The role itself is better compared to a variable than to an interface.
    <br>
  </blockquote>
  <br>
Do you mean something like (for example) the "bounds role" or the "fill
role" for Morphs? If not, then I don't understand what roles mean in
this context.
  <br>
  <br>
  <blockquote type="cite">The&nbsp; corresponding trait can provide an
interface definition, as well as an implementation that refers to other
related roles.
    <br>
  </blockquote>
  <br>
It can but if it's to provide the implementation you end up with
complexity explosion again since the dependencies will be implemented
by other traits, which will require even more traits etc. By the end of
the day there will only be a handful of suitable compositions of traits
that result in something usable (which is exactly what we've seen in
other applications of traits) and these few compositions usually can be
better expressed without traits.
  <br>
  <br>
The idea that having traits require other traits for their
implementation leads to flexibility is flawed. Flexibility results from
having abstract interfaces which allow (and sometimes require) the
implementor of the interface to go only by the observable structure and
not rely on anything that just happens to be part of the
implementation. Traits have been constantly used the other way around
by requiring the users of one trait also to pull in all the garbage
that comes along with the implementation of that trait.
  <br>
  <br>
  <blockquote type="cite">I think Trygve figured out a way to extend
the compiler so that the method bodies (typically in traits, I expect)
can use distinguished "Role variables", which the compiler translated
into a dynamic lookup query.
    <br>
  </blockquote>
  <br>
That will be interesting to see. Although, I can't help but wonder: Why
not simply bundle up these "role variables" and their corresponding
behaviors and call 'em "object"? In which case you'd represent them by
a class, having access to all the state in one place, being able to
encapsulate its behavior etc.
  <br>
  <br>
Cheers,
  <br>
&nbsp; - Andreas
  <br>
  <br>
  <br>
</blockquote>
Why not indeed?&nbsp; I've better get my act together so that we can get a
solid foundation for a constructive discussion, haven't I?<br>
Cheers<br>
--Trygve<br>
<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>