4 ms·
>> 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 nu
by 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?