Next | Program Repair Shop | 14 |
But surprisingly, this very weird example actually demonstrates a red flag
And a really nice one
A variable whose only job is to track the number of iterations through a loop
This is a good example
Because it's obvious that it isn't always the wrong thing to do
For instance:
for my $item (@items) { $counter++; print "$counter: $item\n"; }
But it's usually the wrong thing to do
Next | Copyright © 2006 M. J. Dominus |