News for hackers. Stuff that matters.
Re:A function decorator that rewrites the bytecode to enable... by hamilyon2 on Tuesday September 21, 2021 @10:59AM (#28605686)
Exceptions are forward gotos. A "while" loop with continue and break is backward goto. The only thing missing is break from nested while. Java has one, called break with label, one of more obscure features of language. So, in a sense, python already does have goto.
Re:A function decorator that rewrites the bytecode to enable... by Spivak on Tuesday September 21, 2021 @11:24AM (#28605960)
All control flow constructs in modern programming languages are about codifying the safe uses of goto and setjmp.

For example defer and friends are goto cleanup; and yield and exceptions are setjmp.

Re:A function decorator that rewrites the bytecode to enable... by brundolf on Tuesday September 21, 2021 @11:35AM (#28606090)
Sometimes a feature of a programming language is about making it really inconvenient to do something you shouldn't be doing
Re:A function decorator that rewrites the bytecode to enable... by cute_boi on Tuesday September 21, 2021 @11:03AM (#28605726)
So rust also has goto :)