3 ms·
> Assuming they didn't write any unsafe Rust it's pretty much assured that the new proxy contains ZERO bugs of certain types. And assuming that the libraries y
by flumpcakes 4y ago
> Assuming they didn't write any unsafe Rust it's pretty much assured that the new proxy contains ZERO bugs of certain types.
And assuming that the libraries you depend on also don't have any `unsafe` bugs. This is something people seem to forget when discussing rust. And "the unsafe is well tested" sounds similar to "this legacy C code is well tested". I like rust the language but have consistently negative experiences with evangelists.
Here are some other things that make rust a good choice for developing low level systems:
- Zero cost abstractions like in C++
- A strong type system (and lifetime annotations built into the language, less need for the grind tools)
- In general a stricter language than C++ with far less legacy options
- Newer language with a de facto package manager and build system
There's a lot to like about rust without just saying it's "safer" which is highly nuanced and people seemingly never actually go into the details. I've had many negative votes for even suggesting than C is currently a better choice for Linux Kernel development compared to Rust. People will just say "Rust is safer" and that's the end of the conversation...
- marcosdumay 4y ago"This legacy C code" usually has millions of lines. "The unsafe parts" are usually on the few dozens. The safety is also conditional on rustc not having bugs, and your computer working correctly. But you don't get to pretend those are as risky as some large random, less used C code.
- unrealhoang 4y agoNot only that but also the clear boundary of responsibility. If there’s a way to use a library in safe Rust that cause UAF, that’s the library problem. In C, it’s because you are using it wrong.