News for hackers. Stuff that matters.
Re:C/C++ vs. Rust Performance by dehrmann on Sunday November 01, 2020 @03:18PM (#24962149)
The only times I've really wanted goto were around exception handling. Java (not sure if it started there or was borrowed) actually has a construct that can do this without the issues with goto:

    block: {
        ...
        if (err){ break block; }
        ...
        if (err){ break block; }
        ....
    }
Re:C/C++ vs. Rust Performance by svrb on Sunday November 01, 2020 @07:39PM (#24963881)
Rust has this innovative feature called "functions" which enables you to break from any block by just giving it a name and using "return". It can even return a value!

(/s obviously, but also not /s obviously. The serious point here may be that Java or whatever got in the way of defining functions by requiring them to be "methods" stuck in a "class" rather than, you know, just functions.)

Re:C/C++ vs. Rust Performance by pirocks on Monday November 02, 2020 @12:44AM (#24965096)
A static function in Java is essentially just a function. Also I have no idea what functions being associated with classes has to do with breaking out of loops.
Re:C/C++ vs. Rust Performance by gpderetta on Monday November 02, 2020 @07:10AM (#24967213)
encapsulate your nested loops in a function and return to exit multiple loops at the same time. Having nested lightweight functions allows minimal syntactical overhead compared to plain loops, although still not zero.