'goto" gone from computer languages or is it!
Eric J Korpela
korpela at gmail.com
Thu May 12 12:12:01 CDT 2005
> I miss GOTO. It was unnecessarily expunged from the programmmer's toolbox
> by elitist academics.
It's still present in quite a few languanges. It just doesn't have to
be used. I know of people who use them in long C functions to avoid
large "else" blocks when checking for early return from a function,
especially when there is lots of cleanup to be done before returning.
But if there's more than one goto destination in a function, there's
probably a better way.
But predominantly GOTO was used to make up for missing language
features. (BASICs without else, languages with single statement or
single line IF, languages without case or switch statements, languages
without subroutines, languages without a "repeat forever").
If you're using a language that has all these features you probably
don't need a goto. (Of course, the assembly for all of the above will
contain jumps, conditional or otherwise.)
COME FROM is more useful than goto anyway. :)
Eric
More information about the cctalk
mailing list