News for hackers. Stuff that matters.
Re:Feds: Critical Software Must Drop C/C++ by 2026 or Face Risk by synergy20 on Thursday October 31, 2024 @11:10PM (#42013714)
that means you have to use rust for system level programming then? there is really no other alternative at system programming as far as memory safe is concerned, that uses no GC or VM.
Re:Feds: Critical Software Must Drop C/C++ by 2026 or Face Risk by hgs3 on Thursday October 31, 2024 @11:40PM (#42013856)
You can have a systems programming language with garbage collection. Most concerns regarding GC are around unpredictable pauses, but you can absolutely design a predictable GC suitable for real-time applications.

Rust is not the only option. The Ada programming language was developed in the early 1980s, primarily for the U.S. Department of Defense (DoD). Ada was designed for safety-critical embedded systems and real-time applications, especially in areas like avionics and military systems. In 1991 the DoD mandated Ada, but then reversed the decision in 1997. As I read the linked article and the governments "strong stance" I'm wondering if history will repeat itself.

Re:Feds: Critical Software Must Drop C/C++ by 2026 or Face Risk by anonymousiam on Friday November 01, 2024 @12:23AM (#42014041)
I was going to post that the same sort of mandate had applied to Ada, and was eventually abandoned. I remember Ada the mandate, but I recall obtaining waivers from the mandate (on specific DoD programs) before 1991. I predict that this mandate will suffer the same fate as the previous one.

A quick search confirms my memory:

The DoD Ada language mandate, which required the use of the Ada programming language for most Department of Defense software projects, was established on March 30, 1987 through Department of Defense Directive 3405.2.

https://dl.acm.org/doi/10.1145/255471.255599

Re:Feds: Critical Software Must Drop C/C++ by 2026 or Face Risk by omeid2 on Thursday October 31, 2024 @11:18PM (#42013741)
Re:Feds: Critical Software Must Drop C/C++ by 2026 or Face Risk by candiddevmike on Thursday October 31, 2024 @11:27PM (#42013783)
GC or VM may be perfectly fine for system level programming. Microsoft's project singularity had everything including the kernel using GC iirc
Re:Feds: Critical Software Must Drop C/C++ by 2026 or Face Risk by jandrewrogers on Friday November 01, 2024 @12:05AM (#42013969)
No, you can still use C++ for the foreseeable future for applications that require it. They are saying don’t use C++ in contexts that clearly don’t need it.

There are some important applications in US DoD where Rust is not a viable replacement for C++. You’d need to broadly disable memory-safety and the performance is still worse. C++ isn’t going anywhere for those applications because it offers material advantages over Rust. And to be frank, this kind of software rarely has memory safety issues generally; the kinds of things that lead to memory unsafety are the kinds of things that also produce poor code on unrelated metrics.

Re:Feds: Critical Software Must Drop C/C++ by 2026 or Face Risk by tdeck on Thursday October 31, 2024 @11:34PM (#42013819)
Perhaps Ada?
Re:Feds: Critical Software Must Drop C/C++ by 2026 or Face Risk by synergy20 on Friday November 01, 2024 @12:04AM (#42013962)
also MISRA c and c++
Re:Feds: Critical Software Must Drop C/C++ by 2026 or Face Risk by sys64739 on Thursday October 31, 2024 @11:14PM (#42013722)
That sounds great. I love Rust.