[Pdx-pm] Poll: traits

Kris Bosland krisb at ring.org
Sat Nov 19 11:47:17 PST 2005

On Sat, 19 Nov 2005, Eric Wilhelm wrote:

> What I love about perl's oo is that we really don't need all of the
> formalisms that appear in other languages.  What I hate about it is
> that I don't understand the jargon that appears when people start
> talking about languages with less casual OO constructs.
> "A trait is essentially a group of pure methods that serves as a
> building block for classes and is a primitive unit of code reuse."

I would like to see a comparison chart between different things, and maybe
why people get all hot about them:

duck typing
"traditional" OO

For example, when you say "pure methods" does that mean no implementations
or no member variables?  Is it stateless or abstract?

I would also like to see some code examples that work with one and not
with another.

I think part of the problem is that this OO stuff is trying to impose
order on Complex Systems, so you don't really see the impact until you
realize you have to refactor your million-line application and you wish
you had this OO feature or that.  Tight OO systems restrict your options,
so you better use the right one in the first place.  Loose OO systems
(like perl) mean that you don't get built in consistency, so it is hard to
make something you can 'pivot' later.


More information about the Pdx-pm-list mailing list