Rafael Freire

C first

I started in computer science as blind as you can be. I didn't spend my teenage days on a computer, even less on social media. I joined a technical course in IT on high school simply because it was the option that fit me the best. Luckily for me I had an amazing class on programming logic where we used C and fell in love with it. Later I joined college because I liked computer science, not to chase hype (which is nothing to be ashamed by btw), and that's where I think C was the best thing that happened in my trajectory as a CS student.

C is the second to last step to machine code, only behind assembly instructions. C gives you full control of the memory and while that may be scary and not encouraged for beginners, it teaches them a lot about how memory works, what exactly are variables in a programming language and most importantly, it lets you build abstractions on top of it.

One of the things I hate about Python and other object oriented languages is how sometimes the code is unreadable. A function that returns a class object which has an atribute x, instead of being assigned to a variable I see something like func().x... what does that mean? What is happening? You need to go through pages of documentation to find out what exactly is the object that is being returned. It's one of the drawbacks of high-level languages in my opinion. Sure you can call a function sort() and everything is right but why were the arguments the way they were? Why can't I sort different lists of objects? Too much abstraction for simple things for a beginner is not good in my opinion. Or maybe I ask too many questions.

Another good thing C teaches you is memory management. People talk about how Rust is the best programming language because it gives you the performance of C but with built-in safety. The problem is that Rust fixes C problems, if you don't use C how will you know its problems? Sure your code will be safe, but do you know why you're doing the thing that way?

I'm not advocating for you to make websites in C. Don't go out of your way to make UIs and games in C. It's cumbersome and overly difficult. But not learning C makes learning everything else more difficult. Yes, it is annoying to spend hours writing code to get a segmentation fault, but it is important. You will learn by doing how memory works on a fundamental level and I don't know about you, but I personally prefer very much to learn about memory by messing with C code than by reading books and manuals.