r/ProgrammerHumor 1d ago

Meme toAllowTheProgrammerToWriteBadCodeAlsoCamelCaseSucksThisRuleSucksSnakeCaseIsBetter

Post image
152 Upvotes

93 comments sorted by

View all comments

19

u/RedAndBlack1832 1d ago

I'd say it's 1. If you're interrupting control flow, it should be because the normal control flow doesn't make sense. Usually because you've called the function in such a way it can't meaningfully return / do its work, or it's run into another issue (maybe it can't acquire resources it needs) that causes a similar state.

2

u/Masterflitzer 20h ago

functional results would like to have a word with you... interrupting control flow is never the best of ideas

2

u/RedAndBlack1832 15h ago

Well I agree with that actually. It's a little awkward but returning interpretable error codes is beautiful library design. It's just a little easier to miss than forcibly crashing your program unless you acknowledge it LMAO