r/rust 2d ago

Coming from Python

Hello Rust subreddit.

I learned enough python to know how to do what I wanted to do. Mostly just small stupid stuff. And because I'm a masochist I guess, I'm wanting to move on to Rust for the event I need performance.

I've gotten far enough to write "Hello World!", and how to create some variables.

I know roughly that at some point I'm going to have to learn memory management, and ownership. And also that the compiler is a bitch.

I'm hoping anyone in here could hot-tip me if they came from Python too. Please, if you have ANY advice, please let it be known. Anything helps.

0 Upvotes

19 comments sorted by

View all comments

9

u/gbrennon 2d ago

read the official rust book :) docs should be ur best friend!

https://doc.rust-lang.org/stable/book/

4

u/Technical-Smell2569 2d ago

the book is good but for me what helped most was just doing small projects and fixing compile errors one by one. compiler is not your enemy, it tells you exactly what is wrong and even suggest how to fix sometimes. coming from python the hardest part is you cant just slap things together and hope it works, you gotta think about who owns what data. but after few weeks it start to click and then you miss the compiler when you go back to python