4 ms·
I think your view of Rust is quite off. How is Rust view "state is evil"? At its core, Rust is very imperative and procedural. Global reasoning about state is
by unrealhoang 6y ago
I think your view of Rust is quite off. How is Rust view "state is evil"? At its core, Rust is very imperative and procedural.
Global reasoning about state is hard, hence the assistance from borrow checker. Locally mutating local state in small function? Put a reference to vars, if you want them to be mutated, just make them mut. It's also as fast.
In a way, Rust does better job of localize/encapsulate mutation than functional/monad world.