5 ms·
The thing people get excited about are guarantees you get when compiling your (hopefully well written) Rust code. A huge chunk of software we have today is bui
by zelphirkalt 6y ago
The thing people get excited about are guarantees you get when compiling your (hopefully well written) Rust code.
A huge chunk of software we have today is built upon other software that is built upon other software that ... but that whole foundation is rather shaky and probably incorrect. Basically, if you want to express it that way: Everything is broken and we have played the wrapping game for far too long as a professional group. There will probably forever remain bugs in that gigantic mountain of code, that we rely on.
People get excited about rewriting things in Rust to avoid a good chunk of the legacy code written in languages that are not memory save and that do have a lot of undefined behavior or allow for race conditions easily once you even as little as touch concurrency. People want to finally have a solid basis, which is proven to be correct in implementation. Rust goes a long way towards this goal, so people like it.
I subscribe to some great projects' repositories and read the issues. These projects sometimes bring me great value and I am not saying they aren't useful. Usually however, non-trivial C++ or C (and other languages) projects have all the same kind of issues. People thinking every noun has to be a class and the standard paradigm of mutating everything everywhere, be it through setter or directly, then forgetting to update state at some point, where it was necessary. People sharing state across multiple threads and forgetting to acquire a lock or releasing it. Or in some other way building race conditions. People thinking they will be able to do manual memory management correctly and then having segfaults, which require long debugging sessions or a lot of experience to fix. Use after free bugs. Security issues resulting from such causes. This and all that kind of stuff, that a good type system should prevent you from doing. And that is where Rust delivers.
- serverholic 6y agoHere's a relevant statistic. Microsoft tracked all their security vulnerabilities over 10 years and found that 70% of them were caused by memory-related bugs.
- zelphirkalt 6y agoAre you sure it wasn't the Chromium project? I have this one in my mind: https://www.zdnet.com/article/chrome-70-of-all-security-bugs-are-memory-safety-issues/ https://www.zdnet.com/article/chrome-70-of-all-security-bugs... But then again it could be the same for other projects and just be a general thing that happens.
- pjmlp 6y agoAnd yet the only language allowed on Azure Sphere, their high security IoT device is C, while WinUI marketing line is being written in C++, go figure.