Is it a new /g/ copypasta? There is some truth and some retarded stuff in there.
I agree that C code will continue to run long after all of us browsing this website will be dead.
It's a relatively simple language in terms of features, yet it's incredibly powerful in terms of what you can achieve with it.
The kernels of most operating systems are written in C. The runtimes of most garbage collected languages are written in C. There is a C compiler for almost any computing platforms and processors.
Learning C is a must for any programmer who wish to be good at their craft and understand how our computing environments are implemented. For example, Java/C++ like OOP is nothing but a bunch of pointers to structs, functions and unions under the hood, and some void* manipulation wizardry for generics.
However, C is not a good first language to learn.
It's a good 2nd or 3rd language, but the first language I tried to learn was C and I was quickly discouraged, in part because of the old-school build chain.
Python is a good first language, because you can rewrite and execute code quickly, it's immediately useful with its large amount of libraries, and its type system, despite being dynamic, is more sound than C. Python is strongly typed, it has TypeError exceptions, while C is weakly typed, i.e. you can implicitly convert a pointer value to a signed long and your program will compile. The only mainstream language with a worse type system than C is Javascript.
Also, using C
correctly is hard, you can segfault very easily, or make a program who needlessly use gigabytes of RAM because you did something retarded like using malloc() in a loop and forgot to call free().
Let's not even talk about the "undefined behavior" rabbit hole.
I've tried the Zig programming language recently, and it seems to be a really promising alternative to C for low-level programming.
It's easy to install on Windows, Linux, MacOS and FreeBSD, things like "defer" simplify your life a lot, the compiler complains more about unsound algorithms and type conversion, the language documentation (without the stdlib) is only one HTML page.
The build system uses the language itself, instead of arcane stuff like Makefiles and CMake, and can relatively easily integrate C and C++ libraries into Zig programs, especially C libraries. You can even use Zig solely as a build system for C and C++ software.
The only problem is that the language is very unstable so far, you can't compile 0.10.1 code with the newer 0.11.0 versions without changing your code. Tutorials from 2 years ago may not work anymore. It's the most frustrating part of using Zig; also some prior knowledge of C is recommended IMO.
But when it works, it's much more fun than using C (and C++) because you don't have to avoid so many footguns. I would rather use it for the few low-level hobby projects I have in mind than C/C++ if I can. One guy working on OpenJDK said it's the best designed language he has seen since Scheme (
https://news.ycombinator.com/item?id=24292760), so it makes me hopeful about Zig's future.