Hacker News new | ask | show | jobs
by anyfoo 1596 days ago
Kernels written in C are often full of gotos. There's nothing wrong with gotos per se, it's only harmful if that's your (or one of your) primary means of control flow, e.g. because you don't have other good options. BASIC for example had that problem back in the day.
1 comments

Well, many BASICs had GOSUB, which sort of gave you function calls (albeit sans parameters)
Yes, but that was pretty much it: GOTO, GOSUB, and NEXT. And GOSUB is pretty much useless for building control flow equivalent to while/try/catch/... and even just if/else, or only "if" with more than one statement. NEXT works for only special cases of "for". So, most of the time, GOTO it is...