2 ms·
> I just want to add that the "goto" criticized on that paper does not exist anymore in any modern language (that includes C). It might not be called goto, but
by zokier 9y ago
> I just want to add that the "goto" criticized on that paper does not exist anymore in any modern language (that includes C).
It might not be called goto, but isn't setjmp/longjmp essentially the same?
- klodolph 9y agoNo... you can only longjmp if the jmp_buf corresponds to a setjmp created within a function call which hasn't returned yet and in the same thread. I would call this a primitive form of structured programming with some serious limitations--it's kind of like throwing an exception, but more primitive, and it's kind of like the Common Lisp block/return-from, except less convenient, and it's kind of like call/cc but with a bunch of limitations added. You can do some dangerous things with longjmp to implement coroutines, but it's horribly non-portable.