• zxqwas@lemmy.world
    link
    fedilink
    arrow-up
    160
    arrow-down
    2
    ·
    3 days ago

    C++ gives you enough rope to shoot yourself in the foot. If you did not know rope could do that you should have read the manual.

    It’s like a chainsaw with all the bells and whistles but all the safety features removed. Sure you can chop wood with it really fast and probably stone too if you #include diamondteeth library, you can even hammer in nails if you #include hammer. But you are alone responsible for your safety and it’s probably not the best tool for any given job.

    • vivendi@programming.dev
      link
      fedilink
      English
      arrow-up
      29
      ·
      2 days ago

      You should also really be using the latest chainsaw model with new safety features, but your workplace swears by the gas guzzling piece of shit from 1996

      • Blass Rose@pawb.social
        link
        fedilink
        arrow-up
        8
        ·
        2 days ago

        I loved when my IDE would warn me that my code wasn’t deterministic unless I used c++11 or newer compilers because previous versions technically didn’t define how it should work, so every compiler handled it differently.

        And all the times I had to specify C++11 because it had features I needed, and suddenly it was a huge headache because the testing pipeline wasn’t REALLY compatible, it just said it was, and then handed it off to manual review. Something I didn’t know until 6 months after I started using it…

      • mmddmm@lemm.ee
        link
        fedilink
        arrow-up
        9
        ·
        edit-2
        2 days ago

        The new safety features all break down under stress and make the tool as safe as the 1996 piece as soon as you put them in a dangerous environment.

        Also, both the new and the 1996 pieces have hidden explosives that were placed there by the new tooling used to build them. Nobody will tell you where they are, you should know that already. Don’t hit them.

        • vivendi@programming.dev
          link
          fedilink
          English
          arrow-up
          3
          ·
          2 days ago

          Do they? As long as you use RAII and modern shit and keep to something like GCC, it should be safe, right?

          I don’t do C++ these days

          • mmddmm@lemm.ee
            link
            fedilink
            arrow-up
            1
            ·
            21 hours ago

            it should be safe, right?

            Are you phishing for an Anakin / Padme meme?

        • AnyOldName3@lemmy.world
          cake
          link
          fedilink
          arrow-up
          2
          ·
          1 day ago

          Like a real powertool, if you unscrew the safety features because you feel they’re getting in your way, they no longer provide safety. Having the guard from a chainsaw in your back pocket does nothing to protect you from the chainsaw you’re holding.

    • gnutrino@programming.dev
      link
      fedilink
      English
      arrow-up
      61
      ·
      3 days ago

      C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do it blows your whole leg off

      Byarne Stroustrup (original creator of c++)

    • magic_lobster_party@fedia.io
      link
      fedilink
      arrow-up
      49
      ·
      3 days ago

      The incredible thing about this chainsaw is that no two people use it the same way. You think you knew most things about the chainsaw until you see someone else use it. They use a completely different technique, holding it in a way you never considered a possibility, and use buttons you didn’t know were even there - let alone what they are for. They’re equally mystified in terror when they see you use the chainsaw.

      • zxqwas@lemmy.world
        link
        fedilink
        arrow-up
        29
        ·
        2 days ago

        No chainsaw in the world can prevent you from chopping your leg off. Modern ones have a kickback bar, safety throttle, chain catcher, centrifugal clutch etc making it harder.

      • TomMasz@piefed.social
        link
        fedilink
        English
        arrow-up
        14
        ·
        2 days ago

        True, but some make it easier than others. In some cases, they default to foot shooting, you have to work to shoot elsewhere.

    • dwemthy@lemmy.world
      link
      fedilink
      arrow-up
      4
      ·
      2 days ago

      The bells and whistles would need to be pretty loud to be heard over the regular chainsaw operation noises

    • iii@mander.xyz
      link
      fedilink
      English
      arrow-up
      23
      ·
      3 days ago

      Keith will work his ass of if you show him some love, because he’s not used to that

  • Lembot_0003@lemmy.zip
    link
    fedilink
    English
    arrow-up
    28
    arrow-down
    6
    ·
    3 days ago

    This is how Keith looks in the hands of Python “programmers”. While being cared by normal specialists, Keith looks gorgeous and healthy. And can do super cool tricks too.

    • ZILtoid1991@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      12 hours ago

      Yes, but takes it a lot more time, while newer and better system languages exist. D even has the advantage of building upon C instead of OCaml (like Rust and a lot of its competitors did), but if you want to opt-out from the garbage collection, you’ll also have to opt-out from most mainstream D libraries.

    • Zip2@feddit.uk
      link
      fedilink
      arrow-up
      5
      ·
      2 days ago

      Python programmers also pump Keith full of tranquillisers and you have to indent his legs one at a time to let him walk.