4 ms·
The dev cycle is slower, yes, but once it compiles, there is no debug cycle.
by queuebert 3y ago
The dev cycle is slower, yes, but once it compiles, there is no debug cycle.
- throw10920 3y agoWildly false. Rust's design does virtually nothing to prevent logic errors.
- jandrewrogers 3y agoSo then tests are optional? Most bugs are elementary logic bugs expressible in every programming language.
- kelnos 3y ago> So then tests are optional? Yes and no. You're gonna write far fewer tests in a language like Rust than in a language like Python. In Python you'll have to write tests to eliminate the possibility of bugs that the Rust compiler can eliminate for you. I would much rather just write logic tests. > Most bugs are elementary logic bugs expressible in every programming language. I don't think that's true. I would expect that most bugs are around memory safety, type confusion, or concurrency issues (data races and other race conditions).
- jandrewrogers 3y agoPython is not a language I would consider to be meaningfully comparable to Rust. They have very different use cases. In modern C++, memory safety and type confusion aren’t common sources of bugs in my experience. The standard idiomatic design patterns virtually guarantee this. The kinds of concurrency issues that tend to cause bugs can happen in any language, including Rust. Modern C++, for all its deficiencies, has an excellent type safety story, sometimes better than Rust. It doesn’t require the language to provide it though, which is both a blessing and a curse.
- pjmlp 3y agoI have found someone that never introduces logic errors, and found out a way to use dependent types in Rust. /s
- imtringued 3y ago95% of my "logic errors" are related to surprise nulls (causing a data leak of sensitive data) or surprise mutability. The idea that there is no debug cycle is ridiculous but I am confident that there will be less of them in Rust.
- pjmlp 3y agoI bet it won't survive a pentest attack, and there are more things missing on program expectations than only nullability. On the type system theory, Rust still has quite something to catch up to theorem provers, which even those aren't without issues.