4 ms·
Yeah, with Rust lifetimes it's much easier to reason about, compared to eg Java. Also, in something like Haskell it's not that your data does not change. It doe
by loxs 6y ago
Yeah, with Rust lifetimes it's much easier to reason about, compared to eg Java.
Also, in something like Haskell it's not that your data does not change. It does change and people employ really complex idioms to facilitate that. It might be "easy to reason about", but it's definitely not easy to grasp. Lots of people find it much easier to just mutate something (hence the popularity of imperative languages).
Rust takes best of both worlds. You can both mutate, and you are sure that this is compile-time guaranteed, so you can't just try to mess with a value that this part of the code does not own.