logoalt Hacker News

socalgal2today at 4:16 AM0 repliesview on HN

I agree with you.

rust solves a real problem. It makes it much harder to create a large class of bugs, bugs that are in most C and C++ projects (and many other languages). Sure, maybe rusteans have bad attitudes. Not sure that's true but I do get the annoyance of "I re-wrote cat in rust!".

We see these C/C++ bugs all over. Mozilla just fixed a ton of them, most of which would not have existed if Firefox was written in rust (see servo). That doesn't mean there would be zero bugs. It means there would be less. But by some accounts, a ton less, especially of the security issue kind.

And it's not just about the op, the op being a perfect expert programmer who never writes bugs. It's about someone quits, someone who doesn't know the code as well and takes over, they quit, someone who knows the code even less takes over, and in that world, the person adding a new feature to the app/tool/library is far less likely to add a security bug to a rust repo than an C/C++ repo.

> rewriting projects that have been working for decades

They have been working for decades AND are full of security bugs!

Switching them to rust generally means (1) the existing security bugs are gone (2) most future updates are far less likely to add new ones.

Note: I'm not a rust programmer. I'm a C++ programmer dealing with the fact that there are so many UaF bugs in our code with > 1000 programmers. We know more will be added because C++ does not prevent them and we're not perfect. Rust does, or at least it prevents enough of them to be worth it.