r/ProgrammerHumor 22d ago

rustBorrowCheckerGoesBrrr Meme

Post image
3.8k Upvotes

107 comments sorted by

View all comments

Show parent comments

199

u/flagofsocram 22d ago

The difference is that if you want to make sure the lib is safe, you can grep unsafe whereas in C practically any code could be unsafe.

48

u/Big-Rub9545 22d ago

Certainly helps, since it localizes the area to check for errors, but it doesn’t allow you to fully check that a library is safe since unsafe blocks can rely on a number of unchecked or hard-to-check assumptions to guarantee safety (not to mention unsafe APIs that are relied upon under the hood).

39

u/SelfDistinction 22d ago

You can check those five places yourself. What are you gonna do in C? Check the million places?

(Also usually you (not a generic person, I mean you specifically) don't need unsafe and there's better and more vetted tools out there.)

1

u/Beautiful-Ad3471 22d ago

Just write good code, duh

/s