-
Book Overview & Buying
-
Table Of Contents
Rust for C++ Developers
By :
Linters have a long history in computer science and exist in many programming languages. As the name may imply, they can take the "lint" out of your code by running a light form of static analysis on your program and highlighting potential problems. Using a good linter is like having a very smart code reviewer sitting at your desk with you.
Linters for C and C++ focus heavily, but not exclusively, on the misuse of pointers and other memory safety issues. Rust already protects you from those types of mistakes by default, so the best reason to use Clippy is that it can teach you ways to improve Rust code that wouldn't be obvious to beginners otherwise. These can range from reducing the amount of typing required to perform common tasks to teaching you how to avoid common performance pitfalls.
Linters live and die on their signal-to-noise ratio. Minor issues may be easy to flag with static analysis, but users...