Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Re: (tye)Re: GOTO considered (a necessary) evil?

by Anonymous Monk
on Jul 16, 2002 at 01:39 UTC ( [id://181979]=note: print w/replies, xml ) Need Help??


in reply to Re: (tye)Re: GOTO considered (a necessary) evil?
in thread GOTO considered (a necessary) evil?

Linked from the previous discussion you will find Loop Exits and Structured Programming: Reopening the Debate which does a very good job of explaining why returns from the middle of subroutines and loop exits are a good thing.
  • Comment on Re: Re: (tye)Re: GOTO considered (a necessary) evil?

Replies are listed 'Best First'.
Re: Re: Re: (tye)Re: GOTO considered (a necessary) evil?
by RMGir (Prior) on Jul 16, 2002 at 10:15 UTC
    You seem to have misunderstood my position...

    I wasn't saying they were bad, I was just saying I'd worked with someone who thought
    a) goto's BAD, no exceptions
    b) return from middle of subroutine == goto.

    That's NOT my position at all. I believe in _necessary_ gotos, and don't mind return/redo/last/next at all, as long as they're not used to cause chaos :)
    --
    Mike

      I didn't misunderstand. I was just not clear enough.

      I meant that to be a resource you can use in discussions with people whose understanding of structured programming is more religious than practical.

      As for goto, very few are "necessary", and experience says that so-called necessary gotos generally have a better replacement. Furthermore the ability to combine loop control and named loops removes the vast majority of goto statements - including every one that Knuth pointed to in his rebuttal as being useful for algorithmic efficiency. So while I might agree that necessary gotos are OK, I likely mean something different by that than you do.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (6)
As of 2024-04-19 08:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found