Can you elaborate a bit on how the bug worked and why Rust would have prevented it? I'm genuinely curious because the only bugs I've ever had with comparable presentation and consequences have been logic bugs which no set of language features could possibly prevent.
Why did it take a long time to track down the bug? You had a test case which triggered it, so in theory just running under valgrind would have been enough.
Or did it not happen in that case?
I'm not even gonna comment on the rewrite, that reads like an ad. :-)
Something glaring would be if we were getting values that were zeroed out or something like that, but when the only difference is that a slope is -1.4 instead of -1.6 or something like that, you don't immediately realize something's up.
Once we realized there was a bug, it took a long time to track down, and after that I was so frustrated I started writing a new library from scratch in Rust for our research and it worked out pretty well.
Anecdotal evidence for sure but it was really nice not having to triple check for memory race issues.