When you roll a pair of dice, you do not ask the die cup, or the table to total them. There seem little benefit of wrapping 2 dice in a collective object, so that you can add a method to sum their values.
my $score = sum $dice->roll;
Doesn't look like it would benefit from encapsulation to me?
In reply to Re: How to name a subclass of an object class?
by BrowserUk
in thread How to name a subclass of an object class?
by muba
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |