this post was submitted on 24 Oct 2025
105 points (96.5% liked)

Programmer Humor

28473 readers
1103 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
 

OK, first of all, I am not a programmer. (yes, I heard the "thank god") Perhaps I could make the top example simpler.

But anyway, I kind of like goto too much. I find it more intuitive to just jump around and re-use parts rather than think about how to do loops without too much nesting.

In high school, we only did Python. I really wanted to do goto in Python as well, but all I found was this April fools' goto module.

Now in college we're starting with C, and I am starting with Bad Habits^TM^.

Anyway, tagging every line was BASICally just for the joke, but it is useful to just jump to any random line.

you are viewing a single comment's thread
view the rest of the comments
[–] aaaaaaaaargh@feddit.org 16 points 2 months ago (1 children)

That is until you're doing something more complex, then goto becomes no-go.

[–] 30p87@feddit.org 5 points 2 months ago (3 children)

Except for error handling, perhaps

[–] aaaaaaaaargh@feddit.org 6 points 2 months ago

Not even that. Switching code flows means potential void of state integrity. Error handling should either terminate discarded states or not interfere at all.

By the way, imagine smart pointers with goto jumps.

[–] yetAnotherUser@lemmy.ca 3 points 2 months ago (1 children)
[–] Sunrosa@lemmy.world 1 points 2 months ago

This video is so fucking funny lol. I can't tell whether it's ironic or not

[–] Hotzilla@sopuli.xyz 1 points 2 months ago

Aww hell no, still getting nightmares on classic asp error handling.