Going back to the exceptions:
Framework wrote:
Exceptions are used to allow the program to recover from a run-time failure and not to escape nested scopes. |
Well, exactly. The purpose of the exception in the nested loop
is to process an error.
Can you (or anyone ) provide an example where there isn't an error, but one needs to jump out of all the loops?
I would have thought if there was no error, then the loops could complete naturally. If not, then perhaps it could solved with some redesign.
There was a long debate about goto's in the Lounge not long ago, hopefully we don't have to revisit all that again.
Another comment I have concerning
goto's and infinite loops is that maybe it a case of saying one thing to beginners and the opposite to more experienced coders. I see this quite a bit in my sport of Ballroom Dancing. To a beginner, a coach might say: "Don't stand up too high on your toes, it will be easy to lose your balance." And to an advanced dancer: "You always have good balance, stand as high on your toes as you can."
Is this a fair analogy? I wonder if I can get my negative reputation (imaginary) point back? :+D
I wish we could all have real reputation points.