3 ms·
gotos are fine. people are tired of guidance being turned into rules and then into dogma.
by jimjimjim 8y ago
gotos are fine.
people are tired of guidance being turned into rules and then into dogma.
- notacoward 8y agoI 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.