Hacker News new | ask | show | jobs
by sidlls 3409 days ago
One wouldn't, generally, at least in the astrophysics domain. The kinds of guarantees Rust makes don't add anything.
1 comments

Not getting incorrect results due to UB with signed arithmetic or corrupted data sets?

Then again, Fortran would cover these scenarios and is better established.

Arithmetic in these contexts is done with floats. Any errors that would result in signed arithmetic issues would thrash so many other things about the problem that protections against UB would rarely be an issue. It's a legitimate possible use case, but not one to justify a choice in one language over another.

And your point about Fortran is great. I used that and C++ for my research and never once encountered an issue that Rust's guarantees would have helped with.