JPDev@programming.dev to Programmer Humor@programming.dev · 8 months agoifn'tprogramming.devimagemessage-square106fedilinkarrow-up1629arrow-down111
arrow-up1618arrow-down1imageifn'tprogramming.devJPDev@programming.dev to Programmer Humor@programming.dev · 8 months agomessage-square106fedilink
minus-squaregex@lemmy.worldlinkfedilinkarrow-up43·8 months agoSome C++ style guides suggest the following naming convention for functions that crash on any error OpenFileOrDie()
minus-squarexmunk@sh.itjust.workslinkfedilinkarrow-up21·8 months agoPHP has the always wonderful (and perfectly functional) syntax of logUserIn() or die();
minus-squareevatronic@lemm.eelinkfedilinkEnglisharrow-up2·8 months agoWhere do you think PHP stole it from?
minus-squareKissaki@programming.devlinkfedilinkEnglisharrow-up6·8 months agoPersonally, I like to call catched exception variables up, so for a rethrow I can throw up;.
minus-squareTwilightKiddy@programming.devlinkfedilinkarrow-up1·8 months agoExcept rethrowing an exception in C# is just throw;, anything else is a crime against the person who reads your stacktraces.
minus-squareOpenStars@startrek.websitelinkfedilinkEnglisharrow-up4·8 months agoIt’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)
minus-squareVorthas@programming.devlinkfedilinkarrow-up3·8 months agoOne 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.
minus-squareyum13241@lemm.eelinkfedilinkarrow-up1·8 months agoNow what about GZDoom’s GoAwayAndDie();?
Some C++ style guides suggest the following naming convention for functions that crash on any error
OpenFileOrDie()
PHP has the always wonderful (and perfectly functional) syntax of
logUserIn() or die();
Or Perl
Where do you think PHP stole it from?
Bash?
Personally, I like to call catched exception variables
up
, so for a rethrow I canthrow up;
.Except rethrowing an exception in C# is just
throw;
, anything else is a crime against the person who reads your stacktraces.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)
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.Now what about GZDoom’s
GoAwayAndDie();
?