I don't recall the last time I used 'goto'.
The last time I used 'goto' was about 1992 or so. The client
changed the spec long after I had started the coding stage.
Indeed, I was in the last throws of testing.
And suddenly, there's a new requirement that was not easy
to accomodate. Sigh.
I did learn to make some changes to my coding style such
that "that sort" of change was easier to accomodate.
But at the time, I would have either had to have rewritten
substantial code and missed the deadline, or insert one
'goto' statement. And make the deadline.
I agree that 'goto' is not something to reach for
in the usual case, or even the mildly unusual case.
Once in 15 years, and counting. But I'd be unhappy to
have it removed from the language.
I also put that section of code on my "if you change
this code for other reasons, think about cleaning
up this while you are there" list. And, no surprise,
the client changed the spec again requiring that
section to be fairly extensively rewritten. And I
got rid of the 'goto' then.
Socks