News for hackers. Stuff that matters.
Re:A function decorator that rewrites the bytecode to enable... by abnercoimbre on Monday September 20, 2021 @09:56PM (#28601259)
Oh my goodness! I'm using this right away (yesterday I was lamenting lack of goto for this exact use case.)

This is just Java, right? I don't think I've seen this in the C/C++ specs or compiler extensions.

Re:A function decorator that rewrites the bytecode to enable... by jcranmer on Tuesday September 21, 2021 @09:59AM (#28605074)
Labeled break/continue are present in most languages that postdate Java. Go, JavaScript, Kotlin, Nim, Rust, Zig, for example, all have labeled break/continue as well. The only notable post-Java language I'm aware of that doesn't have it is C#. Languages that predate Java generally don't have such a feature--and this includes C/C++.
Re:A function decorator that rewrites the bytecode to enable... by superdisk on Monday September 20, 2021 @10:07PM (#28601326)
Well if you're using C, you could just use a proper goto.