4 ms·
I have incredible bias here, but this is my experience. I never think about memory management in Rust. I write code, the compiler yells at me when I make a mist
by steveklabnik 6y ago
I have incredible bias here, but this is my experience. I never think about memory management in Rust. I write code, the compiler yells at me when I make a mistake, and then I fix it. There’s no huge amounts of time thinking about this at all. That’s the compiler’s job!
Like, last week I wrote some code that had a use after free, because I wasn’t thinking. I wasn’t thinking because I didn’t have to. The compiler thinks for me. It told me my mistake, I immediately fixed it and moved on. This was like a ten second process. “Oh yeah that takes ownership but I wanted a reference, toss an as_ref on it and move on with life.”
I do have a lot more than a year though.
- umanwizard 6y agoI would describe everything you described in your comment as “thinking”. Perhaps we were simply using the word differently.
- steveklabnik 6y agoThat’s possible!