Maybe you could show some code demonstrating your point or clarify this, nothing is truly structural, everything executes, or show something, anything, worth reading. I am personally in accord with some of the best programmers at the monastery who already answered: loop labels can be nice, elucidating even, as long as they are only a couple—three would be my limit before biting the refactoring bullet—deep. | [reply] |
To me, "loop labels are GOTOs." ... "Best practice?" Stomp them out!
I realize I'm responding to a troll, but this is just way too wrong. Yes, one can write bad code in any language. But labels applied to loops and blocks are the solution to avoid gotos. Just one example, compare the code in this node to the one in my reply.
| [reply] [d/l] |
If you find the deeply nested 'if blocks' usually needed to replace 'next' or 'last' are easier to maintain, use them - always!
Personally, I strongly prefer 'next' and 'last'. The issue of labels is much less clear.
| [reply] |