464
Yeah third party thinker just use your brain duh
(programming.dev)
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.
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.