DEV Community

loading...

Discussion on: What are some things you wish you had known when you started learning Rust?

Collapse
dynamicsquid profile image
DynamicSquid

I really wished I learned how the memory ownership worked before I started coding a transpiler (which was my first Rust project). I thought yeah, I code C++, I'm familiar with pointers, Rust shouldn't be a big deal. Then couple hundred lines in I realized how wrong I was :/

Collapse
wisehuang profile image
Jonathan Huang

Agree, I write code for more than 20 years, and I think it's easy to learn any new language based on my knowledge, and then I failed to understand how Rust's memory management before reading the document.
Take two or three hours to study how it works will save tons of your time to fight with the Rust compiler.

Collapse
yjdoc2 profile image
YJDoc2 Author

Thanks for the reply!
Yeah, I think ownership is quite a unique feature of rust, and takes some time to grasp. I too kept tripping on it initially when I started learning Rust , and sometimes still do :) :)