Traits are not what a Perl 5 programmer expects, and they aren't *needed* for what I do. They might be useful sometimes, but my current thinking is that it's better to stick to what your target audience expects, than to use what's theoretically better. I do understand your position, though. I've been there. I realise that I'm quite the hypocrit, but at least I can argue from both sides.

Sticking to what people expect is one of the most important reasons for Attribute::Property to understand the legacy new-value-in-argument convention. A similar thing can't be done correctly for traits, though, as isa just isn't does. Existing code uses isa, and so does new code unless you manage to convince a great many people!

In Perl 6, though, or if traits get famous fast in Perl 5, I will certainly use them (though they are indeed "roles" there, not "traits"). Bootstrapping is very hard, which makes me think Class::Traits won't be common soon. The technically easy way is to get it into the Perl 5 standard module suite. Unfortunately, that's pretty tough in social context. (And, if it's a standard module, you will still have to wait at least 2 years before a reasonable amount of machines will carry it...)

Juerd # { site => 'juerd.nl', plp_site => 'plp.juerd.nl', do_not_use => 'spamtrap' }


In reply to Re: Informal Poll: why aren't you using traits? by Juerd
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.