3 ms·
C/C++ has the dangerous goto under the guise of longjmp().
by kevin_thibedeau 3y ago
C/C++ has the dangerous goto under the guise of longjmp().
- tialaramex 3y agoAlthough longjmp is more dangerous than C's goto, it's not that close to what Dijkstra was warning about. A longjmp is only allowed to move execution back to somewhere it was previously, and in the process all the appropriate book keeping is done, it can't send you somewhere you've never been or evade initialization/ destruction (at least any more so than these languages manage by themselves).