HACKER Q&A
📣 technological

Is Learning Rust a Must?


Everywhere I read , I notice people talk about rust and how everything is being rewritten in rust. Is learning rust is must now ?


  👤 twic Accepted Answer ✓
No.

Rust is a good language in many ways - generally well-designed, innovative, aimed at some under-served but important use-cases, very educational to learn, and surrounded by a lively community.

But only a tiny fraction of the world's work and innovation is being done in Rust. There is a huge amount of interesting stuff happening in other languages. There is also much more work available in other languages - even interesting, well-paid work.

Reasons to learn Rust right now:

1. You need to learn a low-level systems language, for use on a platform that Rust supports; i think Rust is a better bet for many uses than C++ already.

2. You have copious time to invest in learning, and ownership type systems are the most interesting or powerful thing you don't currently know.

3. There is some specific piece of software you want to get involved with, and it's written in Rust.


👤 sumanthvepa
I'll take a contrarian view. C++ which Rust proponents usually target for replacement, is an extremely well tested language. In any real commercial application where a system programming language is needed, C++ would usually be a better choice if you know the language. If don't know C++, learn Rust, it's probably easier, and you'll make progress faster. But Modern C++ is extraordinarily powerful -- it may be worth learning to build some high performance systems like games and browsers.

👤 gadmm
We taught Rust at Masters-level as part of a course meant to show engineering students a variety of concepts from innovative programming language (there was also Haskell and Scala). Learning Rust is a must (at least for our kind of students), but not because "everything is being rewritten in Rust".

First, I think knowing concepts from various languages makes better programmers. But Rust in particular is part of a family of languages along with C++ that are very powerful and versatile, but that require a strong discipline in order to write correct programs. And while C++ is more widespread currently, learning Rust teaches you this discipline, simply because the compiler will keep rejecting your programs until you understand it. C++ compilers on the other hand happily accept nonsensical programs, and it is hard to find modern C++ experts to teach this skill (and sometimes it is even hard to get experts agree on what the discipline is!). Yet in some areas where C++ has few alternatives, unreliable software can have huge consequences. So learning Rust is important because it will also make of you a better C++ programmer.


👤 tracedddd
This is like asking if you have to learn German to find work. Obviously you should be able to find work in any major language, but it may increase your opportunities (if you want to work in Germany.)

👤 jollybean
We probably read very little about Java and yet it runs the world.

What we like to read and write about may not be very well correlated with reality.

Rust is a very niche language, gaining attention, and a serious contender to be an important language but it's probably not going to take over any space and even if it does, it's going to take a long while.

You definitely don't need to learn Rust.

It's a neat language though and it's worth tooling around in for a bit, at very least to get a feel for the 'borrow checker'.


👤 Iv
If you are in a field where everything is being rewritten in Rust, then it may be a good idea to spend some time on it. It is not the case of every field though.

Basically, Rust seems like a good replacement for most C++ applications. It offers memory and thread safety guarantees with no or minimal overhead and a speed comparable to C++.

I am currently working on two projects: one in python, one in Rust. I am a proficient C/C++ dev but I think I will ditch C++ in the near future. I am not sure it makes sense to replace C with Rust unless safety is required.

I don't see rust replacing python. Rust is painful to write, it is longer than C++ and python is much more productive when you can afford the overhead.


👤 jguzmanjr
I would say it depends. Rust aims to solve perennial issues in software development by bringing as many issues “forward” in the development cycle. The way I think about the tradeoffs personally is that Rust is more "durable" than other languages. Its more rigorous type system and compile-time checks pushes more of your failure case discovery early into the development cycle while you're still getting it to compile, as opposed to runtime testing and debugging. There's less followup patching and bugs to discover because Rust usually makes you handle them up-front - particularly if you embrace the type system.

👤 cjbprime
No, this is an echo chamber thing. The commercial software industry has largely not even heard of Rust. (Arguably they should!)

The number of jobs available to purely write Rust code in the world is still very very small.


👤 rvz
> I notice people talk about rust and how everything is being rewritten in rust. Is learning rust is must now ?

Like all other programming languages, only if you need it and if it fits your use-case. Otherwise a better language can be used instead.

If it were me, the language I'd learn and use is the one that makes me the most money possible. At this stage for me, it is not Rust.


👤 PaulHoule
If you like it.

If you are interested in systems work you will need to know some C++ even if you don’t like it.

What I really want is a theorem prover attached to a macro assembler, that might scratch the rust itch better than rust.


👤 0des
There will always be a popular language, if your goal is to get eyes on your stuff and get on the front page of HN, sure, write it in rust. If it were two years ago, I'd say write it in Go. If it were 5 years before that, I'd say NodeJS.

👤 kyawzazaw
That's because you are on HN.

👤 Xophmeister
No, but why the reluctance? Not that you must learn it, but being open to learning new things as an engineer (or just about anyone) is generally positive.

👤 UK-Al05
No, it's competition for C and c++. Lots of programmers don't know C.

👤 pops8
Doesnt matter what you pick in an ever changing unpredictable world overflowing with software. All that matters is how many hours you put in and how close you are to areas where there is a high density of software development going on.

👤 spacechild1
I think you spend too much time on HN :-)

👤 claudiug
no.

👤 mastrsushi
Far from everything is being rewritten in Rust. It definitely shows up on HN quite a bit, along with other places. But I think that’s just growing traction.

It seems to have a bright future, but for the time being isn’t established enough to be worth learning for sake of industry relevance.

If you simply like Rust, go ahead and invest time into learning it. There are companies looking for developers.

It’s just not “the standard” at the time being.