this post was submitted on 07 Oct 2025
32 points (94.4% liked)

Linux

9696 readers
588 users here now

A community for everything relating to the GNU/Linux operating system (except the memes!)

Also, check out:

Original icon base courtesy of lewing@isc.tamu.edu and The GIMP

founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] spartanatreyu@programming.dev 7 points 2 days ago

Gotos being bad falls in the it depends category.

Bad:

  • When you think you're going to do something clever (when you should probably be reaching for a different tool that you may or may not know exists)

Good:

  • When in the form of a jump that's was written by a sound compiler
  • When learning how assembly works
  • When working on codecs and you're actually going to spend the many hours to get everything right.
  • Labelled breaks in nested for loops
  • Embedded systems when resources are constrained
  • When writing debuggers
  • When writing anti-cheat systems
  • And finally, when you actually need to because you're manually managing things (e.g. you're writing a kernel)