r/learnprogramming • u/Additional-Memory121 • 5h ago
Learn rust
Could you tell me what the situation is with Rust? Is it worth learning, looking ahead to the next 5 years? Or would it be better to learn C instead?
4
Upvotes
8
u/Joe-Arizona 5h ago
You should learn C then Rust. A week or two tops and you’ll understand it.
Every programmer should know C, even if it’s just a little bit.
6
u/softmirage82 5h ago
Rust is definitely worth learning, jobs for it are growing and it pays well. but honestly C and Rust aren't really competing for the same spot, learn C first for fundamentals then Rust makes way more sense.
2
u/futur3_pr3s3nt 5h ago
Its USP is that it's a systems programming language with memory safety by design, and it seems that many people and organizations (the Linux kernel developer community and Microsoft being two of the highest profile examples) have bought into this. So it looks like it will maintain a foothold in systems programming.
Apart from that domain, everyone and their dog seems to be rewriting anything they can get their hands on in Rust these days, and using it for all kinds of things failry remote from systems programming. That's the hype/fad side that I for one look forward to seeing fade, but that's just C-loving old me.
I think learning C is still a solid choice. It's not going away. Rust won't replace it, and the other proposed 'C killers' (Zig, Hare, ..?) won't either.
2
u/cyrixlord 5h ago
You can't go with with c. Learn rust on your own time or unless your job may require it
2
u/korywithawhy 3h ago
depends why you want to learn it. if it's for yourself, then absolutely, if it's for employment, then c is king, and will probably remain so for the foreseeable future. again, some languages like zig are really good for a lot of things but won't get nearly as much widespread use.
3
u/sessamekesh 5h ago
Rust is great, and you'll definitely pick up some C along the way if you're learning Rust.
I personally think it's really silly to either/or when C is one of the options, C is a stupidly simple language (simple, not easy). If you have your feet under you with Rust, C will take you maybe a weekend or two to pick up.
I would still start with Rust though. The compiler is actually your friend (... Generally) and it forces you to take on a mindset that will be very useful when you pick up C.
Above all though I'd suggest not becoming a one trick pony with Rust. That way lies sadness.
2
u/Blissextus 5h ago
Learn Rust. There is nothing wrong with learning Rust. Rust, like other languages, is just another tool that could potentially solve a software problem. If Rust interests you, learn Rust!
Personally, if you're forward looking 5-years ahead, I'd start with learning the C-Language. C-Language will get you the hands-on knowledge you'll need for low level systems understanding. C-Language is small. Learn it and then if you feel Rust may be the better fit for the software problems you're attempting to solve, learn Rust!
1
u/DanKegel 1h ago
Yes.
1
u/StewedAngelSkins 1h ago
I don't think there are very many rust jobs that wouldn't also expect you to know C (and probably also C++). However there are plenty of C jobs that don't expect you to know Rust. So if you're talking job prospects you have to plan to learn C at some point. That said, you don't have to learn it right now. If you know neither language you're not going to be employable for several years anyway, so you'll have plenty of time to pick up both.
1
u/Fit_Day375 4h ago
Learn both.