Personal Computer News


GOTO Gets A Boost From A Fan

 
Published in Personal Computer News #075

GOTO Gets a Boost from a Fan

I feel bound to fly the flag for GOTO. Why, apart from a warped sense of purism, do so many home computing writers so roundly condemn the humble GOTO statement? Simon Williams, in his otherwise excellent article comparing BBC and Locomotive Basic (issue 73) is at it again, referring to the 'infamous GOTO statement'. I put it to the readers of PCN that the infamy of the GOTO statement exists only in the mind of the purist.

As one who writes a great deal of software of one sort or another, I find the delights of structured programming over overrated and, to be honest, not particularly useful. All it seems to do, when applied, is to demand more memory than there is or at least use more than you'd like, thus limiting what can be done with a single program. I mean complex programs, not simple small routines.

I heartily wish those who keep advocating the removal from Basic of the GOTO statement would consider its real usefulness.

I never advocate the use of backwards GOTOs, and avoid them if I can, but for practical, not theoretical, reasons. Even here, though, there is something no better way to re-run part of a program than to use one. And again, if GOTO were removed, what would replace it? I do not believe there is never a time when an unconditional branch is necessary.

I do, however, support Simon Williams' contention that WHILE...WEND is a more useful structure than REPEAT...UNTIL, especially when it can be nested.

What I have seen of Locomotive Basic suggests to me that it will prove an excellent dialect, but even that suffers from the need to place space around keywords, which is another structured feature that wastes memory.

Like all programmers, I suppose, I would not consider my creations especially good, or particularly marvellous, but I do like them to work. The effort involved in trying to write programs without the GOTO statement would surely be too horrendous to contemplate.

P. Craddock, Walsall.

Simon Williams, like all PCN reviewers, is allowed to express his opinions, but I side with you, Mr. Craddock. If it works, don't mess with it. - Ed

P. Craddock