NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
Read this paper (Score:1)
One of the papers that the Traits guys wrote called Applying Traits to the Smalltalk Collection Hierarchy [unibe.ch] is very relevant to this. It shows what is, in my opinion, a perfect example of where roles are best used and how they are superior to inheritance. The key thing to note is that they still retained a lot of inheritance where there was a true is-a relation, but they removed a lot of unnecessary inheritance that was really only there to achieve code reuse.
- Stevan
Reply to This