in reply to Re^2: How to name a subclass of an object class?
in thread How to name a subclass of an object class?
If you have to explain then it doesn't make sense. This is a little like Corion's How to best pass on the context / wantarray? issue: you have to know subtle stuff beyond the immediate context to understand the code. In fact, if you don't know that stuff you may get completely the wrong idea about what the code is doing.
In this case I'd be inclined to add a member to List that calculates the total for the list. Then The code explains itself:
my $total = $list->total ();
doesn't leave much room for ambiguity.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: How to name a subclass of an object class?
by muba (Priest) on Mar 27, 2006 at 01:20 UTC |