4 ms·
I'm sure you'd be seeing the same results by rewriting the project in modern C++ instead of Rust.
by gigel82 4y ago
I'm sure you'd be seeing the same results by rewriting the project in modern C++ instead of Rust.
- thesuperbigfrog 4y ago>> I'm sure you'd be seeing the same results by rewriting the project in modern C++ instead of Rust. I would personally choose Rust over C++. I dislike the number of gotchas that C++ has and I think the language has gotten too big and complex to use safely. In the article I linked above, the Google Android team stated: "To date, there have been zero memory safety vulnerabilities discovered in Android’s Rust code." Their C++ code requires more static analysis tools and fuzzers and does not have a comparable record. If modern C++ were as safe as Rust then why wouldn't they just use modern C++? It would be a lower effort rewrite and would not need new compilers.
- simplotek 4y ago> I would personally choose Rust over C++. I dislike the number of gotchas that C++ has and I think the language has gotten too big and complex to use safely. This take sounds like fomo mixed with cargo cult programming. When you write something in C++, nothing forces you to use all features of C++. There is no bingo card you have to fill to get your project to compile. You just pick the things you feel serves your purposes, and stick with them. I don't really understand this irrational take. It's like claiming they don't want to speak in English because the dictionary is too large and some words are too tricky to spell to use in a conversation.
- thesuperbigfrog 4y ago>> I don't really understand this irrational take. It's like claiming they don't want to speak in English because the dictionary is too large and some words are too tricky to spell to use in a conversation. It's not irrational to want to avoid trouble. Why would I want to use C++ with its plethora of gotchas, traps, caveats, pitfalls and footguns when I can use something safer and just as performant?
- Jweb_Guru 4y agoThe Android study had a control: they compared to memory safety vulnerabilities in other greenfield projects written in modern C++. There was no significant improvement for the greenfield projects, even though they also benefited from improvements to static analysis. The improvements were reserved for Android, which had a large share of its new sensitive code written in Rust.