3 ms·
> goto cleanup; Isn’t goto a big no no?
by Alifatisk 3y ago
> goto cleanup;
Isn’t goto a big no no?
- frankjr 3y agoNot in C - it doesn't have a better / cleaner mechanism for dealing with error situations. https://sourcegraph.com/search?q=context%3Aglobal+repo%3A%5Egithub%5C.com%2Fopenbsd%2Fsrc%24+lang%3Ac+%5E%5Cs*goto+%5Cw%3B%24&patternType=regexp&sm=0 https://sourcegraph.com/search?q=context%3Aglobal+repo%3A%5E... https://sourcegraph.com/search?q=context%3Aglobal+repo%3A%5Egithub%5C.com%2Ftorvalds%2Flinux%24+lang%3Ac+%5E%5Cs*goto+%5Cw%3B%24&patternType=regexp&sm=0 https://sourcegraph.com/search?q=context%3Aglobal+repo%3A%5E...
- Alifatisk 3y agoThat’s so interesting ans goes against everything I’ve been taught during high school and uni!
- AceJohnny2 3y agoThis is one of those lessons that go: 1. Junior level: don't do it 2. Journeyman level: don't do it 3. Master level: don't do it, except when...