3 ms·
Although 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 so
by tialaramex 3y ago
Although 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).