in reply to •Re: On Foreach Loops and Maintainability
in thread On Foreach Loops and Maintainability
<aol>me too</aol>
And to take this a bit further, if there's no else, I'd write this like so:
for (map("arg$_", 1..5, 19), "gee37") { $object->method($_) or next; # ... }
Fewer indentation levels are generally easier to read. Finding this at the bottom of a function always makes me scroll up and down a couple times:
# ... } } } # play "guess the block this belongs to" here $_ .= "something"; } } }
Makeshifts last the longest.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re^2: On Foreach Loops and Maintainability
by BrowserUk (Patriarch) on Oct 11, 2002 at 21:11 UTC | |
by Aristotle (Chancellor) on Oct 11, 2002 at 21:25 UTC |