News for hackers. Stuff that matters.
Re:C/C++ vs. Rust Performance by tornato7 on Sunday November 01, 2020 @02:11PM (#24961698)
Especially because a "professional" programmer should be able to get along just fine without goto. Goto is bad practice in many languages where it does exist, too, like Go.
Re:C/C++ vs. Rust Performance by berkut on Sunday November 01, 2020 @04:31PM (#24962675)
How do you break out of nested loops without an extra variable set/check to break on in the outer one otherwise?

goto is nasty, but in my experience writing HPC code, it does have some uses that can't be solved as efficiently (i.e. without extra branching) otherwise in some situations.

Re:C/C++ vs. Rust Performance by tomjakubowski on Sunday November 01, 2020 @04:33PM (#24962691)
Rust has special syntax to name loops, and to refer to them by name when breaking.

    'foo: loop {
      'bar: loop {
        break 'foo
      }
    }
Re:C/C++ vs. Rust Performance by berkut on Sunday November 01, 2020 @04:52PM (#24962851)
Cool - in which case, at least based on my experience, that would negate the need for goto in the main situation I end up using them in C/C++.

The only other time I've seen it be used fairly regularly is cleanup / return handling, where there are other ways of doing that (RAII structures, if you don't mind creating them), but sometimes using goto for that is just simpler / more obvious than having extra structs/classes to handle that.