DEV Community

Cover image for Is C still worth learning?

Is C still worth learning?

Mustafif on March 07, 2022

Let's clear this myth, Rust is not replacing C, and C is not going away anytime soon. But you may ask, how come? It's because C is still crucial ...
Collapse
 
thumbone profile image
Bernd Wechner

I'd go one further and suggest "learning" C is a bit of an overstatement IMHO. I mean it's not wrong, we learn anything new, but learning isn't learning ... just as oils ain't oils. C is so simple, that learning it is a doddle. It's just one small step above Assembly in that it's a processor independent abstraction.

You can read Kernighan and Ritchie in a casual afternoon and voila, you know C.

Now whether you put it to use or not is another matter. I haven't written C in over 3 decades now, it's simply not a go-to language for the kind of work I've done in the interim, but it will likely always have a niche a very significant one, as it remains the go-to processor independent low level language (and so fro Arduino's for firmware of all sorts where performance and memory footprint are serious issues) because Assembly remains a PITA to write and maintain and not very portable.

Collapse
 
mustafif profile image
Mustafif

I definitely respect your opinion and I still remember when I tried learning assembly (for a day) and I regret giving myself a headache that day.

Collapse
 
thumbone profile image
Bernd Wechner

Yeah, not sure ASM has much use anymore. The main issue being its lack of portability and being one step too low for comfort offering no pertinent benefits over compiled C.

Collapse
 
pauljlucas profile image
Paul J. Lucas

There's a difference between reading K&R and knowing C just like there's a difference between knowing how all chess pieces move and being a Grand Master.

Collapse
 
thumbone profile image
Bernd Wechner

You confuse knowing with mastery. If you read K%R you know C. If you read a chess book, you know chess. If you practice either extensively you gain skill and eventually with enough practice under your belt you become a grand master.

You take valid words but somehow produced a meaningless comment? Knowing and grand mastery are the same.

Thread Thread
 
pauljlucas profile image
Paul J. Lucas

Your original comment (especially with the inclusion of “viola”) comes off in the same sense as knowing how to ride a bicycle, so I submit that it was you who confused knowing with mastery.

Collapse
 
oricohen profile image
OriCohen05

You are completely right, there's no any replacement, the language fundamentals will always be remembered and implemented.

 
pauljlucas profile image
Paul J. Lucas

You:

It is not worth learning today though.

Me:

That's highly dependent on what you want to work on. If you want to work on the Linux kernel and several other operating systems, the Python interpreter itself, the Apache web server, embedded systems, and lots of specialized stuff, you need to know C.

You:

Agreed. But a brand new developer is not going to work on the linux kernel anytime soon.

Due to saying "brand new developer," it sound like you mean "For a brand new developer, it's not worth learning C."

But for a long-time developer, especially one who wants to work on the aforementioned projects, you agreed with me. And now you emphatically say again:

There are better languages to learn today, and C isn't worth spending time on.

Which, again, implies ever, including for long-time developers who want to work on the aforementioned projects. I don't understand how you don't see that your statements are contradictory.

Collapse
 
pauljlucas profile image
Paul J. Lucas

That's highly dependent on what you want to work on. If you want to work on the Linux kernel and several other operating systems, the Python interpreter itself, the Apache web server, embedded systems, and lots of specialized stuff, you need to know C. Plus you really don't understand how lots of stuff works on a fundamental level unless you know C.

 
pauljlucas profile image
Paul J. Lucas • Edited

You wrote:

It is not worth learning today though.

Without further qualification, that means "It is not worth learning ever." If you meant "It is not worth learning initially" then I submit you should have said that.