3 ms·
There is a saying that you can make any program run fast if you don't care about correctness. We have reached the point where C programmers cannot understand t
by phicoh 5y ago
There is a saying that you can make any program run fast if you don't care about correctness.
We have reached the point where C programmers cannot understand the language/compiler anymore.
Given that this has been going on for a long time, my hope is that Rust will be the next systems programming language.
- foxfluff 5y agoDo you think people understand Rust?
- phicoh 5y agoRust can be hard to write, but by and large is not hard to read. Rust does have more abstraction mechanisms than C. So it is possible to go overboard in that area. But that is more a coding style issue. C programs that nest multiple levels of functions pointers can also be hard to understand.
- pornel 5y agoThe safe subset of Rust does not permit any UB. This greatly simplifies understanding of UB in the majority of the codebase — because there isn't any. Only when there's an `unsafe` keyword in Rust, you put your "C" hat on. (it was and continues to be a challenge to uphold this guarantee, because UB in LLVM is so ubiquitous, e.g. Rust had to patch up float to int conversions and eliminate no-op loops)
- duped 5y agoIt's easier to understand production Rust than production C
- cma 5y agoRust code in unsafe blocks has lots of similar issues with fuzziness around aliasing rules: https://github.com/rust-lang/unsafe-code-guidelines/blob/master/active_discussion/aliasing.md https://github.com/rust-lang/unsafe-code-guidelines/blob/mas...