Re: goto: it's conceded
- Posted by ken mortenson <kenneth_john at ya?o?.com> May 28, 2008
- 687 views
Jason Gade wrote: > > Kat wrote: > > > > I just conceded to Derek that i cannot defend every possible use of "goto", > > and i cannot support to his standards the use of "goto". We agreed i will > > not > > be ultimately happy with Euphoria in all regards, perhaps i not use Euphoria > > any more, and i suggested to JBrown he not see what it takes to add "goto" > > to > > Euphoria v4. Is there any other groveling i need do? > > > > Kat > > A disagreement or an unpopular stance doesn't mean you have to grovel to > anyone. > Stick to your beliefs. I agree with Jason. Please forgive if I've been too harsh. I would like, if I may, to make a point about the term that you may find interesting if you don't mind. Spaghetti code is a term that seems to imply a tangled mess. You obviously take pride in not writing tangled messes and would be rightly indignant to have people unfairly suggest that. But realize that even if we all actually did write tangled messes, the computer wouldn't care. To it, the most tangled mess in the world is no different from the most orderly code ever written. That's not the problem. So for just that reason, the term spaghetti code misdirects from the real issue. The problem is that all programmers are human. One of the profound problems that you will see again and again when using GOTO's is that you can write a profuse amount of excellent quality code that takes many hours to create. Then, because of using GOTO's to labels it is much easier to overlook the fact that the code is never reached. Again and again you will see this. This doesn't mean that the same thing can't happen without GOTO'S because it certainly can. It's just a fact that it happens much more often when labels rather than structure is relied upon for program flow. Humans are more likely to make this mistake with labels. This isn't the only problem related to GOTO's but it is perhaps the easiest to perceive.