4 ms·
Agree and Rust's biggest benefit to me over most other languages, is being able to give ownership of a mutable structure away, and knowing at compile stage that
by sixbrx 8y ago
Agree and Rust's biggest benefit to me over most other languages, is being able to give ownership of a mutable structure away, and knowing at compile stage that every part of the program but the receiver loses access to make further modifications to that data. Then the receiver doesn't have to make a defensive copy (which is easy to forget and often hurts performance), or deal with immutable structures where they aren't performant or natural. I'm hoping some easier languages can add this ability - I think Swift might be planning to do some form of this IIRC, hoping to see some other languages follow.