464
submitted 1 week ago* (last edited 4 days ago) by danhab99@programming.dev to c/programmer_humor@programming.dev

"What's your go-to tool as a programmer these days?"

My brain, same as it always has been!

you are viewing a single comment's thread
view the rest of the comments
[-] jwmgregory@lemmy.dbzer0.com 1 points 1 week ago

even if the flags look less elegant you really want to avoid using goto’s in pretty much every context in modern C. it basically only exists for backwards compatibility purposes, so all our shit from 1999 doesn’t go up in flames. it is considered bad practice to use it now because it really complicates the control flow logic and it is much less modular/portable.

i don’t understand thinking using flags would be less elegant, either. wouldn’t you rather have a neat list of everything for garbage collection purposes than having to search through goto statements thrown all around the code?

either way, if you’re in this situation in the first place, you’re writing bad C code. memory management should never manifest in implementation like this.

this post was submitted on 01 Sep 2025
464 points (98.9% liked)

Programmer Humor

26265 readers
2023 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