logoalt Hacker News

omcnoeyesterday at 11:37 PM1 replyview on HN

Not trying to be a Rust advocate and I actually don't work in it personally.

But Rust provides both checked alternatives to indexed reads/writes (compile time safe returning Option<_>), and an exception recovery mechanism for out-of-bounds unsafe read/write. Fil-C only has one choice which is "crash immediately".


Replies

ueckertoday at 12:28 AM

What makes you think that one can not add an explicit bound check in C?

show 2 replies