763
ifn't (programming.dev)
you are viewing a single comment's thread
view the rest of the comments
[-] 0x0@lemmy.dbzer0.com 209 points 11 months ago

I propose a new, more threatening kind of control flow.

do {
  /* something */
} or else {
  /* you don't want to find out */
}
[-] gex@lemmy.world 59 points 11 months ago

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

OpenFileOrDie()
[-] Kissaki@programming.dev 10 points 11 months ago

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

[-] TwilightKiddy@programming.dev 2 points 11 months ago

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

load more comments (9 replies)
load more comments (16 replies)
this post was submitted on 18 Jan 2024
763 points (98.6% liked)

Programmer Humor

19901 readers
1608 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