Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: GOTO considered (a necessary) evil?

by John M. Dlugosz (Monsignor)
on Jul 15, 2002 at 16:22 UTC ( #181842=note: print w/ replies, xml ) Need Help??


in reply to GOTO considered (a necessary) evil?

In well-defined cases, such as jumping to the beginning or end of a loop, we have special keywords that mean this. It is not as bad as goto because you know what they mean in terms of structure, and we also have idioms that go with them.

"Go back to the beginning" is a well-defined point, not a random jump into the middle of the logic.

Check out the redo keyword. I've used it in cases like this.


Comment on Re: GOTO considered (a necessary) evil?
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://181842]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2015-03-30 06:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When putting a smiley right before a closing parenthesis, do you:









    Results (633 votes), past polls