Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

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

by RMGir (Prior)
on Jul 15, 2002 at 16:26 UTC ( #181844=note: print w/replies, xml ) Need Help??

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

It also avoids arguments with people who can't handle goto.

I'd agree with you, except I ran into at least one developer who thought that returns from the middle of subroutines were just as unreasonable as goto's. :)

I'm in the "if I can understand what it's doing, it's fine" camp, myself. The goto in the original message was pretty clear, as is your example.

  • Comment on Re: (tye)Re: GOTO considered (a necessary) evil?

Replies are listed 'Best First'.
Re: Re: (tye)Re: GOTO considered (a necessary) evil?
by Anonymous Monk on Jul 16, 2002 at 01:39 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 :)

        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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://181844]
[Corion]: marto: Yeah - their mother picked all three of them up at the kindergarden to then go to the hospital, and all three of them were well behaved, and all also were quite obedient when they came home, so they recognized the situation
[Corion]: Nice to see that the kids have some understanding of important things that happen and the appropriate behaviour :)
[marto]: at times mine surprise me with this behavior :)
[Corion]: I mean, in a way it would be nicer+easier if they always where that obedient, but it's comforting to see that they are when it matters, at least for now ;)

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (7)
As of 2016-12-08 09:28 GMT
Find Nodes?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:

    Results (138 votes). Check out past polls.