But when unbridled gotos were the only tool in the toolbox, bad code was an inevitability in a codebase of any meaningful size. Not even the best programmer was immune. This is what the "Go to statement considered harmful" paper was about.
It was written in 1968. We listened. We created languages that addressed the concerns raised and moved forward. It is no longer relevant. Why does it keep getting repeated in a misappropriated way?
The idiom `if (error) goto cleanup` is about the only thing I see goto used for. What flow control replaces that other than exceptions?
All of them are better served with more specialized language constructs but as a widely applicable hammer goto is pretty nice.
I don't expect C to have good error handling or generators any time soon but with goto I can deal with it.
Something like libprotothreads can't actually be implemented in a language that doesn't have gotos, so yeah, I see the need for it.
defer has gained in popularity for that situation.
Though gcc supports cleanup functions, just not very ergonomically.
The problem there is the 30K line function, not the goto!