• m_f@midwest.social
        link
        fedilink
        English
        arrow-up
        1
        ·
        3 months ago

        C is definitely still king, but I wonder if crABI will eventually be able to dethrone it:

        https://github.com/rust-lang/rust/issues/111423

        If they can define a useful ABI that manages to include lifetimes, that might just be enough of an improvement to get people to switch over from assuming the C ABI everywhere.

        • Possibly linux@lemmy.zip
          link
          fedilink
          English
          arrow-up
          0
          ·
          3 months ago

          The problem is that both Rust and Go are huge. The compiled binaries are bigger and the compilers themselves and slower and more resource intensive. The current benefit to C is that is lean and compiles quickly.

          • Zangoose@lemmy.world
            link
            fedilink
            arrow-up
            1
            ·
            edit-2
            3 months ago

            Rust is only huge because it doesn’t have an ABI. If you had an ABI (and didn’t have to compile every single dependency into the binary) the binary sizes would probably drop a lot to the point where they’re only slightly bigger than a C counterpart

            Edit: I don’t know if Go has an ABI but they also include a runtime garbage collector in their binaries so that probably has something to do with it.

    • kekmacska@lemmy.zip
      link
      fedilink
      English
      arrow-up
      0
      ·
      3 months ago

      the author of C++ said that C gives you many opportunities to shoot yourself in the leg. You have a much less chance for this to happen with C++, but when it does, you will blow your whole lower body off

      • Valmond@lemmy.world
        link
        fedilink
        arrow-up
        0
        ·
        3 months ago

        Yeah C++ is a bazooka, C is like the death of 1000 paper cuts.

        The paper cuts are all poisonous and kills you anyway.

        • kekmacska@lemmy.zip
          link
          fedilink
          English
          arrow-up
          0
          ·
          3 months ago

          I haven’t used either, but compiled a lot of C source code and they compiled or could be adjusted easier even for someone who barely knows what printf, fopen, or #include are

          • Possibly linux@lemmy.zip
            link
            fedilink
            English
            arrow-up
            1
            ·
            3 months ago

            The thing with C is that you probaby won’t know you messed it up. It happens silently as memory gets corrupted.

            Modern compilers are much more advanced but you still can overwrite stuff in memory with other stuff

  • z3rOR0ne@lemmy.ml
    link
    fedilink
    arrow-up
    0
    ·
    edit-2
    3 months ago

    Girl, I will wear whatever socks you want, but… pulls out my own gun. We’re reading this damn book instead.