this post was submitted on 07 Oct 2025
79 points (98.8% liked)

Programmer Humor

27193 readers
1015 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
you are viewing a single comment's thread
view the rest of the comments
[–] Gladaed@feddit.org 14 points 3 weeks ago (7 children)

Error handling and multi loop exiting are permitted use cases of go-to.

[–] ZILtoid1991@lemmy.world 3 points 3 weeks ago (3 children)

I also use it for avoiding recursive function calls. In theory, this will tell the compiler to just ditch the current stack and go back to the beginning of the function.

[–] bitcrafter@programming.dev 8 points 3 weeks ago (2 children)

In civilized languages tail recursion takes care of this for you. 😁

[–] bss03 5 points 3 weeks ago (1 children)

gcc can do tail-call optimization in C, and sometimes in C++. It doesn't even have to be a recursive call, tho I do think it might depends on the calling convention.

[–] bitcrafter@programming.dev 3 points 3 weeks ago

Oh, cool! I did not know that.

load more comments (3 replies)