In this time and age, publicly hating on stuff is expected. And C is an obvious target. There are a lot of reasons to hate C, as you can see in this tuit:
Now is the time of the interpreted languages, free memory for all and building stuff in a day that works. And C is too close to the metal, ancient, painful and “leave you scars”.
Because, why would we have to care about memory alignments, how structures are stored in memory and all that? Nobody have to do that!
Well, someone or something is doing it because, surprise, it is needed for the computer to work. It needs to assign things into memory, it has to know the sizes because the computer still works in binary.
Developers nowadays are on top of the Tower of Abstractions that allow them to forget, or even to not learn, about those low level details. And that is fine! There is a reason why they exist in the first place: those abstractions are needed for fast development cycles and even faster iterations… but as the Tower of Babel, once unhinged, the Tower of Abstractions made people in the upper level of the tower to not understand what is down in the base. Even forget there was such a thing like a base.
So they are happy, as they didn’t have to experience the Low Level Hell. Somehow computers were getting more and more RAM, more and more disk space and faster processors… until someone pointed out that a simple Hello World program window was using almost 20 MB.
Suddenly, Low Level Hell bites them in the ass and confusion, fear and despair ensued. It is frustrating, I know. But do you still want your database to run fast and efficiently? Well, someone has to care about those things. Do you want your program to be responsive when you click the save button? Well, someone has to manage that memory. And most of the times, the abstractions do something in that line. The problem may be that you have several abstractions on top of others, and mix a framework loading a few MB of unused elements, and in those boundaries between stacks… well, things not always go as expected.
So then we arrive to the core of the point: it is not C, it is probably what this user answered:
Skill issues!
Most programmers in the past used C. It was a great language, considering the alternative, that was the assembler. And they were are to create amazing things. So it is not a bad tool. It is just a difficult one. And there are new languages built on top of abstractions that makes things easier… but can they make all the things better?
A Case for Finding New Developers
Yes, it is true that for having more developers available to cover all the positions needed (or apparently needed, as we are seeing things going other way lately), you better use a language that allows them to learn faster and to develop faster. And there were a lot of those languages that abstracted memory, calls to OS and other weird things away. That explains why Java is so prevalent in the corporate world: when it released, it had similar syntax as C++ but managed memory completely so you could get experienced developers to be faster in learning that new language and new developers were able to get up to speed quickly and be productive. Perfect combination.
That can be the case for different projects and languages, like this story where the use of Lisp, a language that no one was using production and was/is considered more like a academic language, beat the competitors in an impressive way. Just because the tool they chose, Lisp, makes things very easy to implement, modify and improve. There are cases, a lot of them, where the real need is to be able to move fast. And abstracting low level stuff in those cases is a great strategy. They didn’t need to control in detail memory, bits and processor cycles. They needed to be fast in releasing new features and fixing bugs.
But things have been going to a point in which we have many developers, with years of experience, which do not know much about the low level stuff.
And I am not talking about not knowing how to do some particular stuff in their language of choice, but not knowing the concept itself. I mean, developers that ask without irony, why we are not developing everything, including OS and videogames, in Javascript or Python. They are puzzled that there are people out there still using C, C++ or why the new Rust and Zig languages are being developed and adopted. They don’t seem to understand that their own language is interpreted!
Those developers are more than happy to dedicate 20MB of RAM for a program that only shows a window with Hello World… so imagine the care they put into bigger programs.
A Case for Learning and Problem Solving
The main issue with the Tower of Abstraction is that it hinders the learning process. There is a case for learning and programming a bit in C as a student (or junior dev) as J. Merino explained perfectly in this blog post. Go read it, it is easy to read and interesting.
The reality is that a software engineers is not doing anything but solving problems. It just happens that the tools the engineer uses are programming languages, aside from other tools. So the Wars on Programming Languages is pointless.
What is the best programming language of all? The one that provides you the tools for concentrating on the problem at hand and solve it with the requirements and restrictions imposed on it. Period, there’s nothing else that matters.
Do you have to develop a web site application to allow users to access some data or interact with it? Probably some javascript will be great.
Do you have to develop a mobile app? Kotlin could be the best choice (or whatever is now the hip language or framework, I am not familiar with this sector).
But if you have to develop a efficient embedded application or system… no matter how much you hate it, C will be the weapon of choice. Maybe in the near future you may be able to use Zig.
The same applies to game engines, renders or OS. C or C++ are the main choices today. And they will be in the near future.
We are problem solvers.
That is the key. The issue I find with how the industry is going is that, as mentioned above, there are a ton of developers that are very experienced in some language and framework, but lack the fundamentals of the craft.
It is fine to forget about memory allocations during your day to day work (and your life tends to be brighter, to be honest) but you should know what is going on under the hood. Otherwise, you end up thinking that 20 MB for a window that says “Hello b*tch!” or an app that takes every resource of your new brand phone is perfectly fine.
Because when that happens, we end up having PCs 1000x times more powerful than a decade ago, but programs and OSs take the same time, if not more to start than before. With no essential improvements, apart from some fancy visuals that offers no better experience than that PC with a Pentium II you bought with your first salary.
So we have to Hate C…
…and C++ by default, right?
Well, there are a lot of reasons to not like each of those two. It is not difficult to find reasons online for that, explained by expert programmers. Those languages are not perfect by any means. However, hating for the sake of it, or just because they are difficult, is unreasonable.
Don’t you like them? Don’t use them. However, as I hope I explained above with some good explanations from people who know more than I do, there is a case for learning them too. At least, C. The reality is that nowadays there is a big bunch of programmers that lack many fundamentals of programming due to the overuse of huge frameworks and abstractions that make software flaky and bloated. And that is bad.
If you are working with some interpreted language or one that is high level, that is good, nothing wrong with it. However, I strongly recommend you to learn the fundamentals. To avoid becoming an expert in a framework instead of an expert in your own language and understand its internals. That will make you a better developer. And I didn’t say that, it was the Primeagean.1
So you really hate C or C++ because the syntax or over-complications for some of their stuff?
Fine, do not use them. But do what you have to do to learn the fundamentals of the craft. Tackle difficult problems that you never tried before. And even try to use languages you don’t like but you don’t know, because it will teach you the different approaches available in different languages. You will discover the strengths and weaknesses of your language of choice to a deeper level. You will learn fundamentals that apply to EVERYTHING else.
Try different things, try different tools.
Final Comment
I am not a great developer. I started with it too early without much information and eventually moved to other things. Just years (many years) later, after finishing Physics I went back to programming and I’ve been on it for 10+ years. But I keep trying difficult things, learning new stuff and improving. I may never be as amazing as some of the people I linked in this post and that gets me frustrated to some degree. But I am waaaay better than I was when I started. And that is the point.
You have to “compete” with your past self. And you have to be better than that past version of you.
And on the topic of trying tools you don’t like: I never liked Java. That opinion comes from a time that I was young and barely knew programming, and it has nothing to do with its real downsides. It is just an emotional feeling that I developed when I was learning C as a teenager and I was excited that I understood what a pointer was… and Java took pointers out.
But I am using it for learning how to develop compilers and interpreters. And it has been very interesting. I still don’t like it much, but I am learning.
And that is the main goal.
I didn’t link to the specific video because the guy is a beast and creates lots of content. But that is fine, as I recommend his channel in general, so I hope you can enjoy it.