logoalt Hacker News

dwatttttyesterday at 8:10 AM1 replyview on HN

> Regarding the silly point: Fil-C is less of a rock than Safe Rust as everything in C just works.

I'm going to challenge this. Is this from your experience? InvisiCaps, which Fil-C is based on, turns out of bounds accesses into panics. You're saying that turning any "benign" out of bounds into "abort the program" in all the C you? anyone? everyone? uses Just Works?

I'd rather the majority of those failure modes be caught by linters/compiler passes, not runtime safe aborts.


Replies

ueckeryesterday at 9:05 PM

It certainly works in my C programs. And Fil-C demos imply that this also works for a lot of other complex real world programs, i.e. a basic Linux distribution with libreoffice on top... So yes, I would say this just works. I agree that catching this at compile-time is better, and to some degree this also works: https://godbolt.org/z/sse74vK9o

Rust does not offer compile-time guarantee that an out-of-bounds access does not panic either.

show 1 reply