I certainly see this in Perl all the time:
$self->total( $self->total + 1 );
Before automatically writing this off as being bad code, consider:
By coding this as $self->{total}++; you lose these benefits. Sometimes these benefits aren't important, sometimes they're vital. That said, perhaps $self->increment_total; might have been better.
In reply to Re^3: The joys of bad code
by dws
in thread The joys of bad code
by BUU
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |