upvote
> Well, if you exclude all the bad code people have wrote

Nobody is doing this. Please read my comment again.

reply
The difference I see there is any line in a C codebase could have these issues, whereas in Rust they're specifically marked as unsafe sections, with the language having a clear list of invariants it expects the programmer to uphold in an unsafe block. Additionally Rust has a culture of developers specifically justifying the unsafe block and why it's correct in comments. It's a massive reduction of the scope of the code that needs audited, that doesn't mean there can't be mistakes in it, just that it's easier to verify certain properties of the whole codebase.
reply
> The difference I see there is any line in a C codebase could have these issues

Not true.

> Additionally Rust has a culture of developers specifically justifying the unsafe block and why it's correct in comments

Yeah, if your on the message board. Wait til rust hits real world levels of usage and shit code begins to emerge....

It's easy to sit on that pedestal when your essentially a novelty language in comparison to amount of legacy code in production

reply
In general it helps if you read past the first six words of what someone says before responding.
reply
Even if you think having better developers would prevent the problem, the average Rust developer is probably better at writing bug free unsafe code than the average C developer.
reply