Ironically, from the code I've seen, I don't think I've ever seen anyone actually misuse goto, probably because the people who use it actually know what they're doing. That's just anecdotal on my part, but still.
I've lived through the 80's, when 8-bit Microsoft BASIC was a popular programming language. Misuse of GOTO's was quite common, albeit unavoidable.
There was no lexical scoping in BASIC [1] (and all variables were global but that's another topic) so one could literally GOTO any point in the program.
[1] I'm talking about the BASIC one found on most 80s home computers at the time.
Ironically, from the code I've seen,
I don't think I've
ever seen anyone actually misuse goto,
probably because the people who use it
actually know what they're doing.
That's just anecdotal on my part, but still.
This no longer is just anecdotal. An empirical study on this just got linked to on Slashdot the other day.
http://developers.slashdot.org/story/15/02/12/1744207/empiri...I've misused goto at least once in the brave new world(tm) of structured programming. That said, once the cleaner way to do things occurred to me, I refactored it away immediately.
Occasionally when I feel I need something goto-like in very small code I find it is more cleanly expressed as a `for(;;){}` loop with either break or continue as the jump points.
I'm not saying goto is never a good idea. I just want to see a single good example.