Ah, interesting. I’m currently in the Rust rabbit hole, which takes a very different path towards race condition safety (it’s imperative and the compiler separately checks that you’re not using mutability in parallel contexts), but you actually get quite a similar feature, in that you can swap .iter().map() with .par_iter().map() (via a library).
Yeah, borrow checking approach in Rust is pretty neat since it lets the compiler track exactly where a data structure is being mutated at compile time. Rust approach is more efficient overall as well, but structural sharing has its own benefits as well since you get stuff like history for free. XTDB is a neat project that leverages this property for a temporal db.
Ah, interesting. I’m currently in the Rust rabbit hole, which takes a very different path towards race condition safety (it’s imperative and the compiler separately checks that you’re not using mutability in parallel contexts), but you actually get quite a similar feature, in that you can swap
.iter().map()
with.par_iter().map()
(via a library).Yeah, borrow checking approach in Rust is pretty neat since it lets the compiler track exactly where a data structure is being mutated at compile time. Rust approach is more efficient overall as well, but structural sharing has its own benefits as well since you get stuff like history for free. XTDB is a neat project that leverages this property for a temporal db.