in reply to Re: (2) Thoughts on naming loop LABEL: (Why I name hash vars singular. Why label loops?)
in thread Thoughts on naming loop LABEL:
Actually I disagree with AM below (So why am I replying to you? TIMTOPTPI ;-) I think judicious use of labels helps code legibility a great deal, even when the loops aren't nested.
For example, when I'm processing a result set from a database, I often label the loop RECORD: or ROW:. That way, after some long block of code, I can write next ROW; to make it clear I'm short-circuiting the rest of the logic. It's the same reason I choose variable names carefully: it helps me (five years from now when I'm re-reading it) keep track of what's going on.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re (3): Thoughts on naming loop LABEL: (TMTOWTDI, why label loops?)
by Anonymous Monk on May 02, 2002 at 17:06 UTC | |
by VSarkiss (Monsignor) on May 02, 2002 at 17:26 UTC |