Persistent Data Structure Support

Well I think default immutability in Rust is there for a reason - it promotes Functional Programming.

just blocked when you don't need it.

Makes it possible to use Mutability whenever you want it.
I guess while it is safe in Rust we should refrain from using Mutability all over hence the variable by default is Immutable, thus promoting Functional Style.

So use Mutability locally limiting to function scopes as far as possible and Immutability with Functional Programming in general. Goes back to the conclusion in Idiomatic Rust favors Functional or Imperative Style.

1 Like