Civilloquy
  • Communities
  • Create Post
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
JPDev@programming.dev to Programmer Humor@programming.dev · 1 year ago

ifn't

programming.dev

message-square
106
fedilink
620

ifn't

programming.dev

JPDev@programming.dev to Programmer Humor@programming.dev · 1 year ago
message-square
106
fedilink
  • gex@lemmy.world
    link
    fedilink
    arrow-up
    43
    ·
    1 year ago

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

    OpenFileOrDie()
    
    • xmunk@sh.itjust.works
      link
      fedilink
      arrow-up
      21
      ·
      1 year ago

      PHP has the always wonderful (and perfectly functional) syntax of

      logUserIn() or die();

      • msage@programming.dev
        link
        fedilink
        arrow-up
        6
        ·
        1 year ago

        Or Perl

        • evatronic@lemm.ee
          link
          fedilink
          English
          arrow-up
          2
          ·
          1 year ago

          Where do you think PHP stole it from?

          • msage@programming.dev
            link
            fedilink
            arrow-up
            2
            ·
            1 year ago

            Bash?

    • Kissaki@programming.dev
      link
      fedilink
      English
      arrow-up
      6
      ·
      1 year ago

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

      • TwilightKiddy@programming.dev
        link
        fedilink
        arrow-up
        1
        ·
        1 year ago

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

    • OpenStars@startrek.website
      link
      fedilink
      English
      arrow-up
      4
      ·
      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)

    • Vorthas@programming.dev
      link
      fedilink
      arrow-up
      3
      ·
      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.

    • yum13241@lemm.ee
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

      Now what about GZDoom’s GoAwayAndDie();?

Programmer Humor@programming.dev

programmer_humor@programming.dev

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !programmer_humor@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.

Rules

  • Keep content in english
  • No advertisements
  • Posts must be related to programming or programmer topics
Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 359 users / day
  • 2.57K users / week
  • 6.68K users / month
  • 16.6K users / 6 months
  • 1 local subscriber
  • 24.8K subscribers
  • 1.37K Posts
  • 33.4K Comments
  • Modlog
  • mods:
  • Feyter@programming.dev
  • adr1an@programming.dev
  • BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne@programming.dev
  • BE: 0.19.5
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org