6 ms·
This is indeed very light in content. Also, while Rust fixes a whole set of problems, it doesn't mean that Rust fixes all possible problems. It is relatively e
by csomar 9y ago
This is indeed very light in content. Also, while Rust fixes a whole set of problems, it doesn't mean that Rust fixes all possible problems.
It is relatively easy to create a situation where you overflow your program. See here: https://github.com/rust-lang/rust/issues/50049 https://github.com/rust-lang/rust/issues/50049
Googling around, there are many situations where bad code can lead to an overflow and your code breaking.
- bvinc 9y agoIt's even easier than that: let buf = [0u8; 810241024];
- urschrei 9y agoWho, ever, anywhere, has claimed that "Rust fixes all possible problems"? This is a straw man. As for bad code leading to overflows and crashes: yes, bad code causes overflows and crashes, definitionally. Rust does not, and has never claimed to protect against logic errors in this way. How could it?
- edflsafoiewq 9y agoThe language in the article is very strong. > Rust is another step into the beyond. When finishing a feature and its test suite I’ll run my program to see it in action, but just as a formality – I already know it works. I also know that it’s going to keep working because meticulousness of the compiler is so good at catching regressions.
- sargas 9y agoThis is a bold statement, specially because not many other languages have such high quality guarantees at compile time. > I already know it works This is the part I don't agree all of the time, but depending on the scope and size of the project, I've seeing this be true. And the compiler is really good at catching regressions, submitting PRs for Rust projects is not easy in the beginning, but it is very hard to insert a regression.
- yarrel 9y agoI've had conversations with enthusiasts who are incorrectly convinced that ownership/borrowing fixes problem X. Trying to explain otherwise to them is an exercise in futility. Because ownership/borrowing. So serious Rust project members may never claim this, but there is a large less widely experienced Rust community who have turned the claims Rust does make into something much stronger and more resistant to logic.
- a_t48 9y agoThis is the equivelent of `~Foo() { Foo f; }` isn't it?
- AndrewGaspar 9y agoYeah, not sure I understand the criticism here. This program also has a bug. fn main() { let a = 3; assert(a == 2, "a should definitely be 2"); } Rust doesn't mean no bugs ever, and it doesn't mean no crashes. It protects you from a very specific class of severe bugs, and it has a pretty good set of built-in primitives to help you write bug-free code in the other classes. No more, no less.
- hathawsh 9y agoThe same author wrote a Rust article filled with a lot of great content: https://brandur.org/rust-web https://brandur.org/rust-web