Hacker News new | ask | show | jobs
by AUmrysh 3897 days ago
In many high level languages a break, continue, pass, that sort of thing (where you want to skip or escape a loop iteration) is usually implemented with a goto as well.

Also, a common use of goto in C is when you're doing something in nested for loops and want to break out of all of them. A goto is actually much cleaner here than using sentinel values or boolean flags, or naughty things like setting your loop variables to be outside of the conditional bounds.

1 comments

Well if you go that way, fundamentally all structured programming techniques are implemented with a goto, that's what jumps are.