Poll: Why aren't you using traits?

Ovid on 2005-11-18T20:52:50

Out of curiosity, why aren't you using traits?

[ ] I don't understand traits.
[ ] I've never heard of traits.
[ ] I prefer multiple inheritance or mixins.
[ ] Single inheritance is good enough for me.
[ ] I don't know of a robust/good Perl implementation.
[ ] Traits are bad, m'kay.
[ ] Other _______________.

Would you be interested in learning more about traits or do you think they're just another silly buzzword? If you are interested in traits, what would it take to get you to start using them?

One thing I've noticed about traits is that most discussions of traits seem to revolve around examples which don't really match up with what people need in the real world. This, curiously, is the same problem that many beginning OO examples have. As a result, people learn about OO and often say "why bother?" I think the same problem affects traits despite how useful they are.


using traits

mikeraz on 2005-11-18T21:05:22

Mark me as never heard of them.

Re:using traits

benh on 2005-11-18T22:40:43

yup me too. [X] Never heard of 'em.

'Course!

Theory on 2005-11-18T23:47:28

[X] 'Course I use 'em, don't be silly!

Traits?

HollyKing on 2005-11-19T03:24:44

I'll have to fall in the "I don't understand traits" camp. I've heard of them, but I've never had a reason to study them before. I have the paper you referenced and I'll read it soon.

To start using them I guess I need a reason to write some code and a few practical examples to see how they're implemented and used in Perl.

Re:Traits?

bart on 2005-11-19T11:22:37

Ditto.

Not ready to deal with them...

osfameron on 2005-11-19T21:10:17

I only heard of traits in the context of p6l. downloaded the "traits paper" but didn't put the time into getting head round it. It looks vaguely like Java Interfaces but cleverer.

In Perl6 where it will be built in to the language and probably form part of standard idioms it seems well worth learning, for Perl5 it isn't yet on the top of my list of stuff to learn and it isn't worth the hassle of really grokking what they do and if there's an implementation (which I gather there is) yet.

Re: Poll: Why aren't you using traits?

Abigail on 2005-11-21T10:59:53

[X] I prefer multiple inheritance.

Re: Poll: Why aren't you using traits?

Ovid on 2005-11-21T17:10:14

So far you're the only person to give that answer. May I ask why you prefer it?

Re: Poll: Why aren't you using traits?

Abigail on 2005-11-21T17:23:31

I picked this because "multiple inheritance is good enough for me" wasn't an option.

I've never use traits. From what I read about it, it's yet another band-aid to supposedly fix what's wrong with multiple inheritance. IMO, there's nothing wrong with MI (except that people keep writing constructors that initialize objects, making it hard to do MI - but that's not the fault of MI, it's the programmers that need to meet Mr. Clue by Four). MI is good enough for me - no reason to use traits, or mixins, or what this weeks favoured band-aid is.

Traits?

Purdy on 2005-11-21T13:58:14

[X] CowboyNeal!

Other

phaylon on 2005-11-21T14:04:48

I'm just waiting for
- runtime additions
- green light on production

Love the idea!

now that I've read a bunch of the Traits paper...

duckyd on 2005-11-23T21:22:40

I can vote

[X] I don't know of a robust/good Perl implementation.