A few years back I was writing AVR8 assembly language and using JMP. I remember using goto in C a long time ago, like maybe the 1990s.
There are legit uses for goto in certain kinds of technical programming like interpreters but there are other ways to do it, similarly that example above is legit but if you are properly dividing your code up into subroutines you don't run into a lot of places where you'd want goto or labeled break/continue, especially in applications programming where you're not going to write sorts or numerical algorithms... Like I'd be likely to reach for it doing the kind of work that I'd be looking in an algorithms book.
A few years back I was writing AVR8 assembly language and using JMP. I remember using goto in C a long time ago, like maybe the 1990s.
There are legit uses for goto in certain kinds of technical programming like interpreters but there are other ways to do it, similarly that example above is legit but if you are properly dividing your code up into subroutines you don't run into a lot of places where you'd want goto or labeled break/continue, especially in applications programming where you're not going to write sorts or numerical algorithms... Like I'd be likely to reach for it doing the kind of work that I'd be looking in an algorithms book.
I've never run into a case where I needed it. I was wondering if labeled break/continue could replace goto in those cases, or make the code cleaner.