3 ms·
About two weeks to get the majority of language features - iterators, some aspects of ownership, structs, stop fighting the borrow checker for the common cases.
by staticassertion 10y ago
About two weeks to get the majority of language features - iterators, some aspects of ownership, structs, stop fighting the borrow checker for the common cases. I was using threads to parallelize my work within the first few days, and that was particularly cool for me.
I'd say another two weeks before I was using lifetimes properly, traits, enums, etc in 'idiomatic' ways.
All in all, 4 weeks before I felt productive.
I come from C++, which helped and hurt. On the one hand, move semantics weren't new - but C++ move semantics felt like nothing* compared to Rust's. It actually really helped me internalize why you would want them in C++.
I knew that returning a pointer to the stack was bad in C++. In rust, I actually started doing that (just parent stacks), but safely.
* Such as
self.foo(&self.bar)
- nicoburns 10y agoI would second this: also about 2 weeks. Interestingly I came from a JavaScript background so I'm guessing it was different aspects of the language that felt unfamiliar.