2 ms·
> When you are comfortable thinking of ownership and pleasing the borrow checker without fighting. That's kind of it. Saying "Rust forces you to think of memo
by steveklabnik 4y ago
> When you are comfortable thinking of ownership and pleasing the borrow checker without fighting.
That's kind of it. Saying "Rust forces you to think of memory ownership" is more accurate at the beginning, but not so much once you're experienced. Rust doesn't make me think about ownership: that's why the compiler checks it. It points out when I've made a mistake, and I move on. That I don't need to keep the rules in my head is kind of the entire point!
- jamincan 4y agoIt's kind of both. I experienced this with Advent of Code, the other day where I had a vague idea of the data structure I was trying to work with, and the approach I wanted to take to solve the problem, but I started banging into errors from the compiler. I had to step back and take a moment to think about exactly what I was trying to do and what that meant for the model I was using. My approach wasn't wrong and it likely would have worked on my first shot in Python or C# or something, but the fact that Rust cares about ownership meant I had to think about it too, even if I only really did that after the compiler pointed out that there were some issues.