3 ms·
Using the magic of Grep Occurrences of unsafe in: Actix-web: 39 A few dependencies Regex: 136 Bytes: 118 Tinyvec: 8 That’s far from exhaustive. So I wouldn’t
by sk2020 6y ago
Using the magic of Grep
Occurrences of unsafe in:
Actix-web: 39
A few dependencies
Regex: 136
Bytes: 118
Tinyvec: 8
That’s far from exhaustive. So I wouldn’t consider this implicitly safer than any particular C++ library that has been through some basic static analysis. If anything, there probably have been way more eyes on STL. I would be even less confident in this case since the author of Actix who probably actually knew what he was doing was harassed out of his own project by the friendly community.
I get the safety for performance trade off, but Rust evangelists pretend this trade off never happens, and it’s very pervasive in important libraries.
- steveklabnik 6y agoYou've now changed the goalposts from "aggressive usage" to "here's a count of a particular substring in the source code."
- sk2020 6y agoI would call dozens of uses in the core and hundreds in the dependencies aggressive usage. Statically determinant memory use is the main reason we’re not taking advantage of decades of C++ development, after all.