News for hackers. Stuff that matters.
Re:Some Were Meant For C (2017) [pdf] by flukus on Monday March 01, 2021 @10:03PM (#26311437)
The borrow checker is 150% sound, it complains about errors but also complains about a lot of things that could have been perfectly fine in reality. There are plenty of times when multiple mutable references would be perfectly safe for instance.

Valgrind might not catch 100% of errors, but at least what it catches are actual errors I care about.

Re:Some Were Meant For C (2017) [pdf] by smallnamespace on Monday March 01, 2021 @11:23PM (#26311891)
That's an interesting (and correct!) objection — in stats terms, it's the choice between having false positives (your type checker rejects some valid programs) vs. false negatives (Valgrind didn't catch these cases).

If you're writing safety-critical software though, being forced to restructure your code to satisfy the type checker (which, in this case, is kind of a simple proof assistant) seems like a sane tradeoff.

Re:Some Were Meant For C (2017) [pdf] by Ar-Curunir on Tuesday March 02, 2021 @01:41PM (#26318756)
You're talking about completeness: the borrow checker rejects some valid programs (any type system will do that). Soundness is talking about catching incorrect programs; the borrowck doesn't allow a single invalid program through.
Re:Some Were Meant For C (2017) [pdf] by xfer on Tuesday March 02, 2021 @02:33AM (#26312794)
Valgrind is not a static analyzer, You should use some C static analyzers to compare the false positive rate. You can use various dynamic instrumentation based tool to detect other classes of bugs that are not caught by the borrow checker in Rust.
Re:Some Were Meant For C (2017) [pdf] by adrianN on Monday March 01, 2021 @11:48PM (#26311996)
Valgrind only catches the errors that your test suite triggers.