• I Cast Fist@programming.dev
    link
    fedilink
    arrow-up
    2
    ·
    7 minutes ago

    What surprised me the most was the speed of the compilation, must be a very small program. I tried to compile Godot from source once. Force-stopped it after 3 hours

  • count_dongulus@lemmy.world
    link
    fedilink
    arrow-up
    12
    ·
    2 hours ago

    This is why I will never touch Javascript again. Long ago when I worked on web stuff, half my workflow was spent in the debugger tracing garbage to find where a typo was. The industry moved to Typescript, and now assuming the strictness checks are enabled, if some Typescript transpiles successfully, I can be 95% sure whatever fuckup I observe at runtime is a logic problem.

    Weakly typed languages were an awful idea. But in general, if the compiler isn’t able to detect most runtime issues (like with C++ here), it’s not going to be the most productive language to use for building solutions compared to smarter alternatives.

    • Jyek@sh.itjust.works
      link
      fedilink
      arrow-up
      4
      ·
      2 hours ago

      It makes sense to me. You start in the top left like how you read and then you get a direction for the order of the conversation. I read it naturally at intended the first time through.

  • abcd@feddit.org
    link
    fedilink
    English
    arrow-up
    12
    ·
    3 hours ago

    Is C++ the first enemy that managed to win against one punch man?

  • brucethemoose@lemmy.world
    link
    fedilink
    arrow-up
    59
    ·
    edit-2
    4 hours ago

    Meanwhile, Rust punches you in the face for the mere suggestion. Again. And again.

    Python happily nods, runs it one page at a time, very slowly, randomly handing things off to a C person standing to the side, then returns a long poem. You wanted a number.

    Assembly does no checking, and reality around you tears from an access violation.

    EDIT: Oh, and the CUDA/PyTorch person is holding a vacuum sucking money from your wallet, with a long hose running to Jensen Huang’s kitchen.

  • henfredemars@infosec.pub
    link
    fedilink
    English
    arrow-up
    34
    ·
    5 hours ago

    Ah, C++. An endless supply of footguns where the difference between a junior and a senior dev is knowing what parts of the language to never use.

      • henfredemars@infosec.pub
        link
        fedilink
        English
        arrow-up
        3
        ·
        33 minutes ago

        You can also make everything a smart pointer and be done with it.

        I can count on more than one hand the number of large scale projects were converting everything to smart pointers fixed major memory issues. Even if smart pointers can’t handle circular references, the number of projects that just don’t manage their memory correctly at all and we’re fixed by introducing these tools is way too high.

  • Lemmist@lemm.ee
    link
    fedilink
    arrow-up
    45
    arrow-down
    5
    ·
    6 hours ago

    So? Do you really expect the compiler to UNDERSTAND the code?

    Here is a grammatically correct phrase for you to think:

    Compilers don’t paint tangential apostrophes unless the storm value is deeper than radish. Fraggles love radish.

    • Thinker@lemmy.world
      link
      fedilink
      arrow-up
      8
      ·
      2 hours ago

      Congratulations, you’ve illustrated the difference between syntax and semantics. But any competent compiler also handles semantics (just in a separate phase of compilation), because that’s necessary for any useful conversion to machine code, not to mention optimizations.

      • kiri@ani.socialOP
        link
        fedilink
        arrow-up
        2
        ·
        5 hours ago

        There are C++ analyzers like this which are also designed to prevent it (if you have no choice between languages).

      • Lemmist@lemm.ee
        link
        fedilink
        arrow-up
        7
        arrow-down
        14
        ·
        5 hours ago

        Prevent what? UNDERSTANDING the code?

        Yeah, Rust is quite successful in that :)

        • bitcrafter@programming.dev
          link
          fedilink
          arrow-up
          1
          ·
          23 minutes ago

          You do not come across as clever as you think that you are when your central point is that you personally are not capable of understanding code written in a different programming language.

          • Lemmist@lemm.ee
            link
            fedilink
            arrow-up
            3
            arrow-down
            8
            ·
            5 hours ago

            That’s a rather old joke. Modern compilers print more adequate things on STL/templates related things.

            And it doesn’t make Rust any better.

            • kiri@ani.socialOP
              link
              fedilink
              arrow-up
              5
              ·
              4 hours ago

              Yeah, I know, that all just a humour. I almost always use C++, inspite of knowing rust (cz no jun vacncies for rust, but still). There is no modern language which is absolutely better than other one — compromises are everywhere, that’s why it’s a silly topic to argue about.

        • AngryCommieKender@lemmy.world
          link
          fedilink
          arrow-up
          1
          ·
          4 hours ago

          I kinda want to look up Fraggle Rock to see what that show was about, but I’m worried I’ll be disappointed in my former self’s taste. I know I watched it when I was like 4-6 y/o.

          • Lemmist@lemm.ee
            link
            fedilink
            arrow-up
            4
            ·
            4 hours ago

            I watched it when I was 30 as a method of learning English. It wasn’t too childish.

  • Thorry84@feddit.nl
    link
    fedilink
    arrow-up
    27
    ·
    6 hours ago

    Typescript on the other hand: Exwuse me sir, you seem to have a little oopsie right here. Oh right! Let me just fix that right up.

    HERE ARE TWO THOUSAND ERRORS! YOUR PUNY LITTLE BUFFER CAN’T EVEN SCROLL BACK TO READ THEM ALL! AND YOU CALL YOURSELF A PROGRAMMER?

  • heavy@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    9
    ·
    5 hours ago

    I mean, the comic is fine I guess, but if it implies the Cpp lady is hitting you, it’s not. That would be the kernel, the lady did what you told her to do.

    • senkora@lemmy.zip
      link
      fedilink
      arrow-up
      7
      arrow-down
      1
      ·
      3 hours ago

      If undefined behavior is triggered anywhere in the program, then it is allowed by the standard for the process to ask the anthropomorphized compiler to punch you.

      100% based and standards-compliant comic