in reply to Informal Poll: why aren't you using traits?
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' }
|
|---|