laziness, impatience, and hubris | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
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."
In reply to Re^3: Solving compositional problems with Perl 6 roles
by Velaki
|
|