News for hackers. Stuff that matters.
Re:Global variables are bad (2013) by jimjimjim on Thursday July 26, 2018 @03:55AM (#17615813)
gotos are fine.

people are tired of guidance being turned into rules and then into dogma.

Re:Global variables are bad (2013) by notacoward on Thursday July 26, 2018 @08:32AM (#17616893)
I wouldn't say gotos are fine, but they're sometimes better than alternatives. I'll take a "goto" to an error-cleanup cascade at the end of a function over ten nested three-line functions, a mini state machine, or lots of little state variables (the most common alternatives) any day. If the language has destructors or deferreds or anything else that automatically triggers when leaving scope that's probably even better, but some older languages - notably C - don't, so dogma often leads to worse alternatives.