this post was submitted on 18 Jan 2024
697 points (98.6% liked)

Programmer Humor

24874 readers
1025 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
[–] gex@lemmy.world 55 points 1 year ago (5 children)

Some C++ style guides suggest the following naming convention for functions that crash on any error

OpenFileOrDie()
[–] Kissaki@programming.dev 10 points 1 year ago (1 children)

Personally, I like to call catched exception variables up, so for a rethrow I can throw up;.

[–] TwilightKiddy@programming.dev 2 points 1 year ago

Except rethrowing an exception in C# is just throw;, anything else is a crime against the person who reads your stacktraces.

[–] Vorthas@programming.dev 4 points 1 year ago

One of the modules in a project I'm working on is called VulkanOrDie which always makes me crack up when I see it in the compilation messages.

[–] MonkderZweite@feddit.ch 4 points 1 year ago

I mean, it makes sense to call ComplainToErrorAndExit just 'die', no?

[–] OpenStars@startrek.website 3 points 1 year ago

It's funnier when you try to SysCallAndDie() :-P

(that's a real thing in perl btw - I guess that function didn't get the memo)

[–] yum13241@lemm.ee 1 points 1 year ago

Now what about GZDoom's GoAwayAndDie();?