Is C programming language worth learning today?

Answer by Jin Ouyang:

By today’s standard, C (or its derivative C++) is an odd language even to Computer Science students because how easily you can write a program that fails to be compiled or how easily that program, even if it is compiled, crashes miserably. Whereas other dynamically typed languages (Python, Perl, PHP etc.) generally enable newbies to write a program that does some meaningful work in a day or two.

By today’s standard, C/C++ still ties too closely to how program and data is mapped to memory, how buffers are allocated/deallocated, how libraries are linked, how processes are spawned, and how IPC/events are carried out etc. And it is very easy, even for an expert-level programmer, to make one mistake on any of the above fronts, to cause ghost memory leak or broken pipes or deadlock. Whereas other languages provide under-the-hood garbage collection, dynamic linking, some simplistic APIs for process management and IPC (such as “`” tick sign and system() in Perl).

By today’s standard, C++ is pretty crazy, allowing for multiple inheritance and other stuffs that provide enough rope to hang yourself. Whereas other languages simplifies their OOO model and prunes features that are pretty odd and not useful.

But, C/C++ are still pretty decent language, and generally result in more efficient implementation because they are kind of one step closer to OS and hardware and allows for kind of tighter control of underlying stack (for example, it has the ability to choose what ISA extension to accelerate certain arithmetics). Therefore, while ordinary programmers use C/C++ less and less often, a significant amount of softwares are still written in C/C++, for example, like others commented, OS Kernel, drivers, EDA software, CUDA, embedded software, and even some high-frequency trading software.

So the chance that you will encounter C/C++ code is very high should you choose a software career (unless you will never need to care about efficiency in your career), and the chance that you will need at least be able to read and understand C/C++ code is  also considerable. Are you advised to learn them as your first programming language? It is not your best choice but not completely a terrible one either. Do you need to learn them at some future point? I think it very likely.

Is C programming language worth learning today?

Leave a comment