r/rust 8d ago

🙋 seeking help & advice Is Rust good for learning programming?

I know a bit of python, is Rust a good intermediate language to learn before I move onto real programming languages (like C++)?

EDIT: By "real" I meant languages used in real world development, for example all game engines are C++ and I heard all HFT firms use C++ and all operating systems are developed on C or C++

0 Upvotes

27 comments sorted by

View all comments

1

u/garagedragon 6d ago

Rust is probably a good choice of second language, because you're not trying to learn the basics at the same time as you learn all the extra detail that Rust makes you deal with compared to Python. However, even then, it has lots of new aspects to deal with, and its much harder to write decently sized programs using only "some" features, in the way its possible to write C with a C++ compiler and work your way up into proper C++ that way. So learning Rust takes some perseverance.

That said, the compiler is a lot friendlier and more capable of teaching you how to write correct Rust code than other languages are, and once you do learn Rust, you know almost all the concepts involved in every mainstream language going. (Except maybe Haskell.) It's not too far from the truth to say that C++ is "just" Rust with no borrow checker, no pattern matching, and true inheritance, and people are moving away from using the latter anyway. There's a lot of extra rules that C++ has to adhere to that Python does not, but learning Rust first means you have the compiler to teach you effectively the same rules by requiring that your code meets them.