No you're not alone, i've never heard of traits either, and after reading most of the introduction, i'm still not sure i understand them.

Correct me if i'm wrong or point me in the right direction, but are traits just basically 'traits' of a class? From there then any other class can inherit these traits, allowing for multiple inheritance to or from any class? I can see how it's a little different than the normal methods. But specifically how does this differ that much from an 'abstract class' ? where multiple classes have all of the same methods that are inherited from one abstract class, thus that abstract class having multiple inheritance?

Forgive me if i'm just spouting nonsense, it's been a while since i've had to deal with terms like abstract, polymorphism and inheritance all in the same sentance. Definately seems interesting though and like someone put a lot of work into that paper. When i have more time i'll definately take a more in depth look

Update

Read a little further... it does cover abstract classes (in C++). Looks like traits tries to solve the duplication of methods and trying to avoid 'name clashes'.

Out of curiosity, has anyone ever used/heard the terms 'mixins' or 'glue methods' ? There seems to be a lot of terminology in this paper that i'm not familiar with


In reply to Re: Informal Poll: why aren't you using traits? by ickyb0d
in thread Informal Poll: why aren't you using traits? by Ovid

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.