News for hackers. Stuff that matters.
Re:Never patterns, exhaustive matching, and uninhabited type... by mpartel on Saturday August 18, 2018 @11:55AM (#17789037)
Performance is not the only benefit. You also get freedom from data races, and (arguably) the borrow checker imposes structure that makes the program easier to read and reason about, because it's clearer who "owns" (and can mutate) what, and what is shared.

I've missed this property when writing Java and JS even before Rust was a thing, and Go has felt the same.

Re:Never patterns, exhaustive matching, and uninhabited type... by Thiez on Sunday August 19, 2018 @03:51AM (#17793113)
Exactly, the clear ownership in Rust allows you to skip the defensive copying that so often happens in Java. Of course you get this property in most languages that do not use garbage collection, but I few restrict mutable aliasing.