Hacker News new | ask | show | jobs
by pizlonator 399 days ago
Over 170 uses of unsafe in sudo-rs. That’s just one example.

That’s “a lot” in my book.

1 comments

There’s no reason to believe that one program is inherently representative. sudo-rs eschews dependencies and so is likely to be higher than most programs.

Furthermore, 170 uses in a 200 line program vs a one million line program are very different. I don’t know off hand how big sudo-rs is.

Even in embedded OS kernels, it’s often around 1%-5% of code. Many programs have no direct unsafe code at all.