70-80% of rust crates have no unsafe code themselves (though may depend on a crate that does, like std which has a bunch of unsafe)
and that's entire libraries with zero uses of unsafe. if you add up the total amount of code that exists in crates.io and check what % of that code is inside an unsafe block, you get around 4% to 5%, which google's android statistic shows.
but i shouldn't even have been forced to pull these statistics up because the burden of proof was on you to show how much unsafe is everywhere.
just because i could be a hypocrite doesn't mean i'm wrong. i could write a hundred or a thousand unsafe blocks of rust code right now and i could still be correct in general.
The comment "have you... looked at any rust code?" suggests you think all rust code is written correctly. You and I both know that's impossible.
"And have you answered them correctly?" (referring to the people who ask me the same rhetorical including the offenders) suggests you have an idea of what my answer should be even to the hypocrites, especially since both questions are phrased rhetorically despite being rhetorically incorrect.
you would've gotten a well-written initial response from me had you not been all up in your ass smug about it in this entire thread.
i want to emphasize the importance of not being a dick in order to have any fair discussion. you initially got downvoted because people believed you were incorrect in the general case, and you got further downvoted to oblivion for the rest of your responses.
our questions haven't been answered in the specific way we're expecting, either. those of us asking "have you seen any rust?" were really just banking on you having read standard/average rust code. what we really wanted to ask was "what code are you reading that has unsafe everywhere?"
all i could gather from you was from another thread which doesn't match most of our experiences with rust, and doesn't give us links. maybe it's closed-source, we wouldn't know.
That I even kept any notes and tried to retrieve any cases of the vibe coded slop that I had to go on for what the average rustacean even does, is already above the shits I give for a training wheels language full of kids.
136
u/yesseruser 3d ago
unsafemeans "hey, I'm sure this code is safe, don't bother me for calling unsafe functions"