Thoughts
I can't use `.get` if I want to mutate—and it doesn't matter that I know that mutating is perfectly reasonable. And it's not even a compiler
limitation. I have a mutable reference to the HashMap—I can remove the entry, mutate it, and re-insert and I know that. But because the HashMap API designer decided that `.get` returns an immutable reference—nothing else matters. It's Java-level OOP. It's encapsulation. I can't mutate the HashMap except for how the HashMap API designer wanted me to. And that's where I think the promise of the "smart compiler" falls apart—the compiler isn't creating the API, it's not figuring out what's allowed. It's figuring out whether I'm following the rules that were set by the Rust standard library designers. And so all the Rust book examples make sense because they're working with integers. But as soon as you touch the standard library, you have to start rotating through 14 different ways to unwrap an optional.
I guess what I'm saying is that the Rust compiler is a borrow-checker, not a borrow-solver.