3 ms·
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
by synergy20 2y ago
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.
- sys64739 2y agoThat sounds great. I love Rust.
- omeid2 2y agoThere is a few options, for example Ocaml, Swift, Erlang, and so on. http://ocamlverse.net/content/systems_programming.html http://ocamlverse.net/content/systems_programming.html https://www.swift.org/blog/embedded-swift-examples/ https://www.swift.org/blog/embedded-swift-examples/ https://www.erlang.org/doc/system/embedded.html https://www.erlang.org/doc/system/embedded.html
- candiddevmike 2y agoGC or VM may be perfectly fine for system level programming. Microsoft's project singularity had everything including the kernel using GC iirc
- tdeck 2y agoPerhaps Ada?
- synergy20 2y agoalso MISRA c and c++
- hgs3 2y agoYou 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.
- anonymousiam 2y agoI 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 https://dl.acm.org/doi/10.1145/255471.255599
- jandrewrogers 2y agoNo, 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.