Re: goto considered essential
- Posted by John E. Franklin <johnericfranklin at rock.com> Jan 21, 2006
- 524 views
How about a goto that only jumps down in the code, not back up to repeat. Use loops to repeat: while or for loop. But goto that jumps forward is good enough for Tom's example, but prohibits spagetti code quite a bit. Or have a jumpback command and a jumpforward command to make the code easier to read and find where you are going. I personally like gotos because a really smart guy whose code I used to read in C would only return from a function at the end of it with "return retval" usually, and he would jump to egress:, which was a label prior to the end of a function. Egress means to exit, so that's what he called it. So that way you don't have two or more return statements in one function. He set the retval and did "goto egress". Anyhow, a jump forward and jump back would be nice for me, but I can stand the exit_loop statement, whatever it is, I just learned Euphoria three days ago.