• gex@lemmy.world
    link
    fedilink
    arrow-up
    55
    ·
    9 months ago

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

    OpenFileOrDie()
    
    • Vorthas@programming.dev
      link
      fedilink
      arrow-up
      4
      ·
      9 months 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.

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