in reply to Re^2: Solving compositional problems with Perl 6 roles
in thread Solving compositional problems with Perl 6 roles
Ultimately, it appears that the crux of the matter is defining what is a behavior vs. what is a trait.
A thief IS a Character who "implements/HAS" the behavior/interface of methods associated with "thieving". An Elf is a Character who IS a type of Character, who HAS certain additional traits.
It's all going to come down to whether you think of the character as an "elf type-of thief," or a "thief type-of elf." This will determine which is the child class by inheritance, and which is the child by "mix-in".
Just some thoughts,-v
"Perl. There is no substitute."
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: Solving compositional problems with Perl 6 roles
by kappa (Chaplain) on Aug 23, 2004 at 12:17 UTC |
In Section
Meditations