White House urges developers to dump C and C++::Biden administration calls for developers to embrace memory-safe programing languages and move away from those that cause buffer overflows and other memory access vulnerabilities.

  • benEnglish
    arrow-up
    33
    arrow-down
    5
    ·
    8 months ago
    link
    fedilink

    Probably a good idea, plenty of languages out there that can give good performance while being memory safe nowadays.

    • hagelslagerEnglish
      arrow-up
      7
      arrow-down
      0
      ·
      8 months ago
      link
      fedilink

      Such as? (Non-programmer here, so I don’t know the ins and outs of programming languages.)

      • benEnglish
        arrow-up
        12
        arrow-down
        0
        ·
        8 months ago
        link
        fedilink

        Zig and Rust come to mind, at least for replacements for low level languages.

        • parensEnglish
          arrow-up
          2
          arrow-down
          0
          ·
          8 months ago
          link
          fedilink

          Zig isn’t memory-safe

          • benEnglish
            arrow-up
            6
            arrow-down
            0
            ·
            8 months ago
            link
            fedilink

            My bad, I was thinking of Nim but wrote Zig for some reason. Long day yesterday 🙃

        • scharf_2x40English
          arrow-up
          8
          arrow-down
          1
          ·
          8 months ago
          edit-2
          8 months ago
          link
          fedilink

          Isn’t that only microsoft exclusive and closed source? Also does compiling it really yield the same speed as C, it is garbage collected isn’t it?

          • 𝒍𝒆𝒎𝒂𝒏𝒏English
            arrow-up
            9
            arrow-down
            0
            ·
            8 months ago
            link
            fedilink

            Was always possible to compile+run C# on Linux using the Mono project. Until Microsoft “bought them out” and created .NET Core, a cross platform version of .NET that MS now encourages people to use instead

            Microsoft’s new linux compile tools rub me the wrong way slightly, with the telemetry that’s opt-in by default.

            Mono is still extremely valuable for older .NET Framework apps under WINE though, way easier to setup compared to the official installers from what i’ve experienced.

            No idea how compiled C# compares to C

              • JakeroxsEnglish
                arrow-up
                1
                arrow-down
                0
                ·
                8 months ago
                link
                fedilink

                But it also doesn’t have memory leaks lol

                • sunbeam60English
                  arrow-up
                  2
                  arrow-down
                  0
                  ·
                  8 months ago
                  link
                  fedilink

                  Definitely. I’ve worked professionally in both. They both have a time and place. I’d be fine with moving all the low level stuff to Rust, but transitions don’t happen by decree so C/C++ will be around for the next 100 years too.

                  • JakeroxsEnglish
                    arrow-up
                    1
                    arrow-down
                    0
                    ·
                    8 months ago
                    link
                    fedilink

                    True that, I’m only at the beginning of my programming journey, so I have a very rough understanding of the differences, pros/cons, and best use cases for various languages.

        • AsifallEnglish
          arrow-up
          3
          arrow-down
          0
          ·
          8 months ago
          link
          fedilink

          *proceeds to wrap everything in unsafe {}

      • lolcatnipEnglish
        arrow-up
        2
        arrow-down
        0
        ·
        8 months ago
        link
        fedilink

        Rust is the main one for the kind of code that’s typically written in C++. Most memory-safe languages make big compromises on performance, but Rust code tends to run about as fast as comparable C++ code.