A grand vision for Rust

63 points by lffg


ngp

Oh man, this blog post is great and I sincerely hope they succeed in bringing these enhancements to Rust's type system. Yes, Rust is already a lot, but on the occasion that I have use for the things covered here, they're incredibly helpful. Having worked on embedded systems with MTBF of 10 years, writing panic-free Rust is not particularly easy (mostly because of all the places you forget can panic, like addition). The refinement types would be really helpful for building complex datastructures on top of plain arrays.

jjw

Oh wow, very good timing, I've been working on a very similar post for the upcoming blog carnival (albeit with dependent instead of refinement types).

On substructural types: don't forget uniqueness types! Unique references in a concurrent setting give you the particularly nice guarantee that you can treat data in a single-threaded manner, without fear of data races (see the paper Data Race Freedom à la Mode from the OxCaml team).