4 ms·
> Having written parallel software in both C and Rust, the memory safety guarantees and easy parallelisation with Rayon offered by Rust contrasts quite sharply
by ghostwriter 6y ago
> Having written parallel software in both C and Rust, the memory safety guarantees and easy parallelisation with Rayon offered by Rust contrasts quite sharply with my poor experience using OpenMP
While I appreciate the strive for safety, and the effort being put into the rewrite, I believe in that particular case it would be more beneficial to rewrite it in ATS with safe formally-proved C rewrites/known to be safe inlined C calls.
- phkahler 6y agoIt seemed like this one area was a definite plus for the rewrite in Rust. I recently added some OpenMP goodness to some C++ code. Making the loops run parallel was almost trivial. The challenge was going over a couple thousand lines of code checking for safety. There were data structures being created and shared in various was but the code was written in a very functional style so it worked in the end. With Rust, all that analysis is done by the compiler. So for that code migrating to Rust is probably a good idea.
- zozbot234 6y agoATS is not readily usable for large programs. Among the "popular" programming languages Rust is perhaps most likely to get some support for interactive formal proof down the road, given that the safe subset of Rust basically enforces the rules of functional programming (and the unsafe subset is self-contained in a way that's not necessarily true elsewhere). Work along these lines is already happening as part of RustBelt.