r/learnprogramming • • Oct 01 '26

Should I learn C or Rust?

I’ve been working as a Java programmer for a few years now.

The thing is, I’d like to learn a second programming language for lower-level tasks—specifically, I want to work on things related to operating systems. Rather than building one from scratch, I’d like to explore and modify open-source operating systems like Linux or a BSD variant.

I’m doing this purely as a hobby. What drew me to C is its simplicity (though not necessarily ease of use) compared to Java or other modern languages, and its long history of use in systems programming. On the other hand, however, there are operating systems (or components of them) being rewritten in Rust—such as GNU coreutils or the adoption of Rust in the Linux kernel.

So, would it be more useful in the long run to learn Rust, given that it might sooner or later become the standard for writing operating systems?

Thanks.

0 Upvotes

27 comments sorted by

View all comments

6

u/takaci Oct 01 '26

You can learn both, C is a very small and simple language as you noted. You can probably go through the K&R book in a weekend or so. If you want to work on OS related stuff, C is generally essential and probably will never be totally replaced

0

u/Feralz2 Oct 01 '26

Linux is slowly moving from C to Rust already. So I wouldnt bet on that.

5

u/takaci Oct 01 '26

That’s completely false. They are doing no such thing 

1

u/takaci Oct 01 '26

That’s completely false. They are doing no such thing 

1

u/Feralz2 Oct 02 '26

Linus publicly talked about this, straight from the horses mouth.
They literally have a Rust team. Theyre slowly moving their code to Rust, it wont be overnight, but its already happening, do basic research to confirm this.

Code is going to be more and more complex, especially with all the Ai slop, security and memory safety is going to be so important.

3

u/takaci Oct 02 '26

No, they are accepting new driver code implemented in Rust. They aren't moving the entire kernel to Rust

1

u/Feralz2 Oct 02 '26

wrong, not just drivers, but actual kernel internal code.

C will still be the main language, and maybe will be for a long while, but Rust isnt merely used around the kernel, its becoming another language which kernel code can be written on.