2 ms·
The 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 spec
by olliej 2y ago
The 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++.