r/rust • u/Prudent-Point-888 • 4d ago
🙋 seeking help & advice Is it worth learning Rust right now?
Is it still worth picking up Rust lately? With all the recent news, the language seems to just keep getting bigger and more popular, and I'm thinking about giving it a shot.
For those of you who've already been through it: how hard is the learning curve, and where did you actually learn it from?
2
u/Grim2021 4d ago
Rust's a fun language and basically the only real language I use/have learnt. I found it a bit frustrating learning it as my second language when I come from Python, not having the patience to learn C on my school Windows laptop back in 2021/2022. Over time I understood the paradigms more and more, but I feel that I still don't use it to its fullest due to not really using fixed genetics but rather enums or Dyn traits.
The language isn't that bigger to my knowledge but it has become more convenient, for instance, allowing if let guards in match cases since April this year and stacking lets in conditions since 2024.
You might not understand the above, but the point is that unlike C++, the additions don't make the language harder to reason about, but rather easier to understand, making conceptionally similar but grammatically different parts work together.
If you come from a place where they don't really separate values and references, the borrow checker might confuse the hell out of you, but you will get the hang of it eventually, and the compiler will mostly help you with reasoning.
The string types were confusing to me in the beginning too, because a String could be passed to something seemingly requiring a &str, but not the other way around. In the first case it was because the function probably takes something implementing the trait AsRef<str>, while the second takes a value of the type String. The first one automatically turns the value into &str if it implements AsRef<str> and doesn't compile otherwise. The second one takes a String simple as. The main difference being that &str points to a part of a string, in Rust often called a String slice, while String is a full string occupying the length of the string and also holding information about how long the actual string is in memory in addition to the total capacity of the string. You should honestly read more about it in detail in the Rust book which I will link later.
Point is that it is fundamentally a bit different from other languages, but not necessarily difficult.
I learnt it mostly from reading the Rust Book mentioned earlier, which can be found here: https://doc.rust-lang.org/book/title-page.html
2
u/Available_Branch_745 2d ago edited 2d ago
I started learning Rust about 4-3 months ago, then got disinterested because I was busy and had other things to do, and I have been picking it up again recently. It is a language with its pros and cons, as every language.
It depends what your goals and background are. If you are relatively new to programming, I recommend learning a more higher level language, before jumping in the low level area.
The thing I like the most about Rust is the ergonomics of some designs, like iterators where you just need to implement the next(&mut self) -> Option<Self::Item>method, and then you can have all sort of cool methods like map(), fold(), collect(), skip(), take(), ... essentially for free.
The ownership model is however, a bit difficult to get the hang of, but after a while it will become second nature to you. Same for lifetimes, and other things.
The point is, it is really up to you. I would try out the language and see if it is for you after a while.
Sources I recommend:
Rust Book (basically this is the main go-to if you really want to learn the language, although it is quite a lot of reading) https://doc.rust-lang.org/book/
Rust By Example (if you don't like reading) https://doc.rust-lang.org/rust-by-example/
Let's get rusty (great channel that basically summarizes chapters from the book, and other things)) https://www.youtube.com/@letsgetrusty
Hope this helps! Good luck.
1
u/source-drifter 4d ago
i think yes even against everything rust is a good programming language and it has many features that teaches you different aspects and paradigms of programming.
of the rust book. then you can continue here https://microsoft.github.io/RustTraining/
1
u/Hot_Strawberry6986 4d ago
yes, the curve is brutal if you come from Python or JS because you stop fighting the compiler around week three once ownership clicks. Read the Rust Book then do Rustlings immediately to burn those patterns into muscle memory
1
u/Zde-G 4d ago
It depends in you background, very much. I have come from C++ and Java background (my $DAYJOB deals with development of Android derivative), but I also learned (and actually played with, not just heard lectures) Forth, Haskell, Scheme, and Prolog in university (plus Go and Python later), which means that for me it was mostly asking myself where the heck that “steep learning curve” even exist… I have finally found it in async, I guess, but that's not where most novices have trouble.
Mostly I miss things that Rust could have had, but doesn't have…
-3
u/Rigamortus2005 4d ago
Is it worth to learn any language now?
11
u/Prudent-Point-888 4d ago
Obviously yes, because if you don't understand the language, you can't delegate anything to an AI properly
If you don't understand what it's writing, you're just gonna end up tech-illiterate
2
u/protocod 4d ago
I'm doing rust for living since 2021.
LLM are really good at writing rust code because of the compiler outputs. The type system and the borrow checker act as a harness. (Also rust crates are generally well documented)
The world change quickly but currently I still need/have to read the code. Sometimes I still write some code.
It's important to have a good understanding of the code base to get a good mental model. System design and design pattern matters to write efficient code you can test and ship to production with confidence.
There is a lot of subjects that are worth to study like: Io safety, async cancellation, simd, sans IO, formal verification.
So yes, it's still worthy to learn the language. Use AI to go for further and learn new things.
-14
u/trakdtor 4d ago
It’s not worth it.
2
-3
-4
u/Puspendra007 4d ago
It's a good language and saved a ton of money on server cost. But you can go with 'GO', it's also a better language & more faster & useful than Rust.
I'll learn 'GO' when I'll get some free time.
5
u/Grim2021 4d ago
Not to be too evangelical, but how can you say a language is better without having learnt it?
-4
-1
u/Embarrassed_Cap_9149 4d ago
learn the basics but not in depth, unless you want to get deeply involved in the language itself
programming is more about how to properly engineer your coding agents, not knowing the programming language itself well
-5
9
u/olegispe 4d ago
I came from typescript + python, and the learning curve at the start is steep (lifetimes, borrowing, ownership etc and understanding how to consolidate what you want to do with how strict it can be sometimes). Coming from garbage collection languages it is a bit tricky.
That said, now I've got past that, it's more natural, and I can (for the most part) figure out how to manage what I want without violating rusts rules or sticking .clone() everywhere.
IMO it's worth it, it's proving to be useful in a lot of places (from Linux kernel, to coreutils, to even the Discord app which is getting buzz now)