News for hackers. Stuff that matters.
Re:Rust things I miss in C by Rusky on Monday February 19, 2018 @12:25PM (#16414186)
The fundamental problem here is that C compilers just don't have enough information about your code. An "unsafe pattern" that might warrant a warning in one place may be crucial in another.

Rust's innovation here is that it can separate these cases based on lifetime annotations on functions and types, where the program text itself disambiguates its intentions.

So to get much closer than current -Wall -Wextra, you need to either impose some default assumptions (the C++ core guidelines do this) or start adding annotations somehow.

There are no comments on this comment yet.