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.

  • omega_x3@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    7 months ago

    Team Fortran raise up, but not too fast our old bones aren’t as strong as they used to be.

  • OutrageousUmpire@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    7 months ago

    I’m not sure what to think about this. It’s bizarre, the White House making any recommendations on programming languages.

    They’re definitely not seen as an authority in this field. Why would anyone care what recommendation they make? And so why make one at all?

    • mox@lemmy.sdf.org
      link
      fedilink
      English
      arrow-up
      2
      ·
      7 months ago

      They’re definitely not seen as an authority in this field. Why would anyone care what recommendation they make?

      It’s possible that they are acting on the advice of advisors who are authorities in this field.

      And so why make one at all?

      I expect it’s because information and industrial security are components of national security, which is of great concern to them, and those things depend on software.

      I’m not surprised to see this, given that state-sponsored electronic attacks are on the rise these days.

    • Mango@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      7 months ago

      They can’t even figure out language for human interpretation much less computer interpretation.

    • AA5B@lemmy.world
      link
      fedilink
      English
      arrow-up
      0
      ·
      7 months ago

      Damn, it’s been like 25 years since I touched either of those. Aside from OS development, do people really do that anymore?

      • ArmainAP@programming.dev
        link
        fedilink
        English
        arrow-up
        1
        ·
        7 months ago

        C++ is also the standard in game dev. You may see some C# here and there, but most engines, public available or otherwise, are built on C++.

        If it is a AAA game, I can assure you it is most likely made with C++.

  • Richard@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    arrow-down
    1
    ·
    6 months ago

    C is not the problem, it’s sloppy “programmers” who cannot handle direct memory control and who do not understand the underlying system architecture and how a microprocessor operates. People who are good at writing C can make code just as safe as the safest Rust code.

    • wolf@lemmy.zip
      link
      fedilink
      English
      arrow-up
      2
      ·
      6 months ago

      I love C, but C definitely is the problem.

      While one disciplined programmer can in theory write correct code, once there is a small group of even good C programmers and a code base with more than around 3000-5000 LOC, there will be bugs. There is a good reason for tools like Valgrind etc.

      While I think C and C++ are the problem, I don’t think Rust is the solution, tho.

    • lolcatnip@reddthat.com
      link
      fedilink
      English
      arrow-up
      1
      ·
      6 months ago

      Your take is objectively false. This issue has been studied and the conclusion every time is that real programmers make memory-related mistakes all the time. Even if there are a few superhuman programmers who never get tired, have a bad day, or misunderstand an API, firing the 99.99% of programmers who aren’t superheroes isn’t a realistic solution to anything.

    • daddy32@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      6 months ago

      It is just too easy to shoot yourself in the foot when using a foot gun… Sure the experts can avoid it, but that doesn’t mean the foot gun is a good tool in general.

    • dejected_warp_core@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      6 months ago

      While this is technically correct, it’s tantamount to saying “just don’t make mistakes”, or arguing that a seatbelt is unnecessary because many are good enough drivers to not need it.

      Languages like C and C++ do not prohibit the kinds of mistakes that the NSA told us two years ago lead to software vulnerabilities.

      Other languages, like Rust, have higher guardrails built in and make it much more difficult to accidentally create the same failure modes.

    • CatLikeLemming@lemmy.blahaj.zone
      link
      fedilink
      English
      arrow-up
      0
      ·
      edit-2
      6 months ago

      If you’re an expert tightrope walker, you’re likely not gonna fall off. You can just do it without too much issue. When you’re doing it over a chasm, and you don’t plan on dying, you’d still probably prefer a harness though, wouldn’t you?

      Edit: I’m not saying C is a bad language or anything, but for important applications the safety of actually memory safe languages is vital for lower-skilled programmers and still a good assistance for higher-skilled programmers, as we’re all humans and it doesn’t hurt to try and avoid the mistakes we will eventually make.

      • lolcatnip@reddthat.com
        link
        fedilink
        English
        arrow-up
        1
        ·
        edit-2
        6 months ago

        I’ll say it. C is a bad language. There was a time when it needed needed to exist and using it was a smart choice, but it has outlived its usefulness for anything but legacy code and niche use cases like FFI. It’s in essentially the same category as Cobol.

  • treadful@lemmy.zip
    link
    fedilink
    English
    arrow-up
    0
    ·
    7 months ago

    “We, as a nation, have the ability—and the responsibility—to reduce the attack surface in cyberspace and prevent entire classes of security bugs from entering the digital ecosystem but that means we need to tackle the hard problem of moving to memory safe programming languages,” National Cyber Director Harry Coker said in the White House news release.

    o7

  • ben@lemmy.zip
    link
    fedilink
    English
    arrow-up
    0
    ·
    7 months ago

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

    • hagelslager@feddit.nl
      link
      fedilink
      English
      arrow-up
      0
      ·
      7 months ago

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

      • lolcatnip@reddthat.com
        link
        fedilink
        English
        arrow-up
        1
        ·
        6 months ago

        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.

        • scharf_2x40@lemmy.world
          link
          fedilink
          English
          arrow-up
          0
          ·
          edit-2
          7 months ago

          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?

          • 𝒍𝒆𝒎𝒂𝒏𝒏@lemmy.dbzer0.com
            link
            fedilink
            English
            arrow-up
            0
            ·
            7 months ago

            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…

  • Imgonnatrythis@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    0
    ·
    7 months ago

    I think we should politicize code. It seems so unfettered by politics so far while so many other things are nicely split amongst party lines. Seems like maybe the Republicans should embrace C and the democrats can have python or something.

    • mox@lemmy.sdf.org
      link
      fedilink
      English
      arrow-up
      0
      ·
      7 months ago

      C isn’t bad. It has been a good portable assembly language for ages, and remains so today. What’s problematic is continuing to use it where more advanced languages now make more sense.

      I won’t defend C++, though. I’m happy to kick it to the curb now that better alternatives are gaining traction.