News for hackers. Stuff that matters.
Re:Rust explained using easy English by hellofunk on Thursday July 23, 2020 @01:10PM (#23929583)
The most interesting thing I’ve learned yet from this, and I’m not quite done with it, is that you can pass a constant (let) to a function, which can accept it as mutable, and therefore actually mutate data that the caller thinks cannot be mutated! I’m not sure how I feel about this.
Re:Rust explained using easy English by kimundi on Friday July 24, 2020 @02:10PM (#23942679)
Note that that is passing by value, so its moving/copying ownership. Its like having a immutable integer variable and copying it to a different mutable variable.