auto_inherit, inherit
Ovid
publiustemp-tapx at yahoo.com
Thu Oct 4 10:30:11 BST 2007
--- Andy Armstrong <n at rciss.us> wrote:
> On 4 Oct 2007, at 06:32, Ovid wrote:
> > Delegation is a better choice, as you don't accidentally override
> > private/protected methods, but we still have the chained/sequence
> > problem with your inheritance scheme. I'm not sure how to fix
> this,
> > but inheritance is the wrong approach. Schwern mentioned traits
> > earlier and Andy A nixed that pretty quickly, but I really can't
> think
> > of any other way -- I mean, this is the problem traits were meant
> to
> > solve.
>
> Let's do traits then. And sorry :)
Conceptually, traits are simple. I even happen to think they're easy.
Most people don't. It's almost like that sinking feeling many
developers get when they first see map and grep.
For us to use traits, we have to have a trait mechanism. If we pull in
Class::Trait, that means we're pulling in something non-core and it
would have to be optional. Also, we'd have to solve the "state
maintenance" issue with traits (I know how to do that, I've just been
too lazy).
If we can think of something that better fits most people's
understanding of OO, I think I'd be happy with that. (I'd *prefer*
traits since they're the future, but not at the cost of confusing
people who don't grok 'em).
Cheers,
Ovid
--
Buy the book - http://www.oreilly.com/catalog/perlhks/
Perl and CGI - http://users.easystreet.com/ovid/cgi_course/
Personal blog - http://publius-ovidius.livejournal.com/
Tech blog - http://use.perl.org/~Ovid/journal/
More information about the tapx-dev
mailing list