3 ms·
Exactly. And raising awareness of use of these less-than-palatable practices tends to lead to a constant pressure to only use them when strictly necessary, gen
by Groxx 5y ago
Exactly. And raising awareness of use of these less-than-palatable practices tends to lead to a constant pressure to only use them when strictly necessary, generally leading things to a broadly safer end state.
(edit: sorry, I removed the chunk about cargo-geiger: https://crates.io/crates/cargo-geiger https://crates.io/crates/cargo-geiger . tl;dr showing something like that everywhere by default would likely encourage fewer unsafe uses (ideally zero), which would usually be a good thing - there's a lot of flawed unsafe use out there. that's part of why it's unsafe.)
- jiggawatts 5y agoAnd the Rust foundation could give out awards for projects that convert crates from unsafe to 100% safe code, etc...
- Groxx 5y agoYeah. A good number that I've run across boil down to "this coding pattern is easier with a dash of unsafe". Sometimes that's valid! But that's pretty strongly "guilty until proven innocent" in my book. Verifying it on all past and future architectures is far beyond my skill, and I suspect that's true of many of the people writing libraries that are using it too. (not all, clearly! but probably many.)