On Mon, 18 Aug 2025 at 15:21, Al Viro <viro@xxxxxxxxxxxxxxxxxx> wrote: > > I suspect that folks with "goto is a Bad Word(tm)" hardon had been told > that goto was always avoidable, but had never bothered to read the proof... I think it's just a combination of compiler people historically finding purely structured loops easier to analyze (back before modern things like SSA). Together with language people who wanted to point out that "modern" languages had structures loop constructs. Both issues go back to the 1960s, and both are entirely irrelevant today - and have been for decades. It's not like you need to actively teach people to use for-loops instead of 'goto' these days. Now, I don't advocate 'goto' as a general programming model, but for exception handling it's superior to any alternative I know of. Exceptions simply DO NOT NEST, and 'try-catch-finally' is an insane model for exceptions that has only made things worse both for compilers and for programmers. So I do think using labels (without any crazy attempt nesting syntax) is objectively the superior model. And the 'finally' mess is much better handled by compilers dealing with cleanup - again without any pointless artificial nesting structures. I think most of our <linux/cleanup.h> models have been quite successful. Linus