Oddbean new post about | logout
 Love this rug analogy of #rustlang ownership by nostr:npub129gvast08lj986yftn7q5qlnj8yfqufxx0m33s9u5xssjm8c64rsve4kwg, it's so simple!

"The analogy is having a rug (value) and persons (immutable references) standing on it. If some person wants to modify the rug, this person (mutable reference) has to take it away for a while (to wash it for example). But Rust doesn't allow pulling the rug under the feet of others."

Read the whole thing here: https://mo8it.com/blog/teaching-rust/#the-rug-analogy