3 ms·
> mean philosophically you could say there is no safe code, but then what’s the point of any language improvement. I have been writing safety critical code for
by Nokinside 8y ago
> mean philosophically you could say there is no safe code, but then what’s the point of any language improvement.
I have been writing safety critical code for living, so I think that saying that code "is safe" because it is written in some language is categorical error (not just error of degree) unless it is a language enables formally proofing correctness.
You can take fundamentally unsafe language like C. Restrict to subset of it MISRA C and use external static code analysis like Astree that that uses abstract interpretation to prove that there are no run time errors: no memory errors, no division of zero erros, no out-of-bounds array indexing, floating-point or integer overflows, loops always terminate, floating point rounding errors stay within specified limits etc. Something that Rust does not have.
Rust has some potential and there are some companies that attempt to provide tooling to make it possible to write safe Rust code, but it's not there yet.
- Rusky 8y agoThat sounds exactly like an error of degree- Rust does have "no memory errors" proof tools already, built into the language.