3 ms·
I must question why one would want mitigations when they could've instead used a safer language like Rust, Go, Java, C#, D, PHP, Python, BEAM, Zig, or Node.js.
by metadat 2y ago
I must question why one would want mitigations when they could've instead used a safer language like Rust, Go, Java, C#, D, PHP, Python, BEAM, Zig, or Node.js. Sure, in some cases you must use C/C++ for $reasons. But most problems, especially public facing services and tools of any real complexity.. no. Exception being maybe postgres?
All the current popular runtimes come with memory safety out of the box.
https://dconf.org/2017/talks/bright.pdf https://dconf.org/2017/talks/bright.pdf was right on the money.
Still, something is better than nothing.
- pjmlp 2y agoBecause the GCC and LLVM code used by some of those languages, and their respective runtimes, is written in C++. As is the large majority of OSes in the market, alongside C. GPU frameworks, Khronos and OpenGroup standards are based on C and C++. By the way, D still has to sort out being @system by default, and not reboot their roadmap every couple of months, finalise the many ongoing improvements out of those roadmap changes.
- olliej 2y agoThe problem isn't just new projects, the problem is all of the _existing_ code. "Just rewrite it" is not an answer, even Mozilla - who created rust for the specific purpose of replacing C++ in gecko was not able to simply rewrite all the C++ and they don't even have to worry about API exposure. I would argue a non-zero part of this failure is the apparent unwillingness to consider C++ interop with rust - which rules out incremental adoption, which is _necessary_ for migration of large code bases. That's why languages like Swift are putting so much engineering effort into C++ interop. In the mean time, there are hundreds of millions of lines of C++ for which mitigating the lack of safety in the language is critical, and saying "why don't you just use language X" does nothing to help that. Finally just to add some notes: Zig is not a safe language, Node.js is written in C++.