3 ms·
Linters will easily catch undefined behavior, better than humans in my experience.
by qbasic_forever 4y ago
Linters will easily catch undefined behavior, better than humans in my experience.
- steveklabnik 4y agoThis is in fact a large part of why people are so pro Rust. Think of the compiler as a very strict linter, one so strict it can catch things that just aren’t semantically possible in many other languages, including C++.
- jjnoakes 4y agoSome linters catch some undefined behavior, but not all undefined behavior (I'm guessing not even most undefined behavior). And no one runs linters. If they did, a ton of CVEs would just vanish. But they haven't.
- mamcx 4y ago> Linters will easily catch undefined behavior, better than humans in my experience. Now imagine if the linter is not optional. Oh, yeah, that is Rust!
- Ar-Curunir 4y agoThat’s exactly what the Rust compiler is: a fully sound^* linter for lifetimes * up to implementation bugs in the compiler
- adgjlsfhk1 4y agono they don't. every use of + in C++ is potentially undefined behavior.