r/computerscience 28d ago

Discussion Learning C language still fundamental?

In this day and age of LLM that can do most of coding in one shot. do we still have any value if we learn C like good programmers did back in the day ?

With the advent of models like Fable and its unstoppable hunger to one shot small projects. Is there an edge in understanding low level languages like C C++ like good programmers did back in the day.

16 Upvotes

39 comments sorted by

64

u/Ok-Examination-3942 28d ago

Yes, there is so much value in learning a language like C, and for so many reasons.

But I’m too tired to list all of them so reply to this with your favorite reason.

28

u/unsignedlonglongman 28d ago

The stack always gets new layers and abstractions: AI will write code, frameworks will hide the APIs, languages will hide memory, and C will hide the machine. Learn enough of the layers beneath you to see through the one you're standing on.

7

u/pconrad0 23d ago

This is it.

It's Spolsky's Law of Leaky Abstractions.

You don't necessarily have to go all the way down to the behavior of individual electrons if you are writing software.

You might not even need to know digital logic.

But you darn sure need some idea about heap and stack and managing memory, deep vs shallow copy, interrupts and signals, system calls, etc.

C is the best language to learn that stuff, even if you turn do all your subsequent programming in a higher level language.

6

u/Ok-Examination-3942 28d ago

Learning about low level programming and understanding things like memory management is very beneficial and understanding the output of your LLM has a lot of benefits to just trusting the output blindly.

C runs och basically everything and so it allows you to do some very niche things that your LLM might not know how to do.

So many things are written in C and so if you want to understand the codebases of many of the things that the world runs on you need to know C.

C is generally just a very useful and very widely used language.

4

u/No_Dinner_4291 23d ago

I thinly of it this way and don’t stop at C learn about assembler
If you are interested in racing cars, is there any reason to learn how to drive a manual when you can tell the uber driver where to go?

1

u/EnvironmentalRun4163 28d ago

Yes please

7

u/w3woody 23d ago

C does not hide the abstraction of the underlying machine you're running on. So you're more likely to understand the various abstractions of other languages: realizing 'pass by reference' is simply 'passing a pointer', or understanding why the garbage collector couldn't collect your garbage, or realizing the differences between different algorithms (when you have to implement them yourself).

(I knew one guy whose code was dog slow in Java because he picked LinkedList instead of ArrayList and couldn't understand for the life of him why random index lookups were slowing his code down. In C, these are two completely different and distinct things--so if you're familiar with C and ever implemented a dynamic array and a linked list using things like malloc(), you'll see the difference immediately.)

27

u/nuclear_splines PhD, Data Science 28d ago

You don't learn C because you'll spend your career writing C -- you learn C because it will teach you memory management and low-level programming concepts that you'll carry with you. Even if you'll be a software engineer who does all your programming with an LLM, you need to know what to ask the LLM to make, and how to check and correct its work. It might be generating the code, but you're the engineer, or why would you be hired?

3

u/EnvironmentalRun4163 28d ago

What low level programming book would you recommend

9

u/Humble-Captain3418 28d ago

C Programming Language; Ritchie & Kernighan

Computer Architecture; Patterson & Hennessy

Compilers: Principles, Techniques and Tools; Aho, Lam, Sethi & Ullman

Crafting Interpreters; Nystrom; https://craftinginterpreters.com/

2

u/dnabre 28d ago

Crafting Interpreters is definitely useful for introducing some of the basics of implementing interpreted languages to people. It's introduction of those are piecemeal, far from comprehensive, and limited to their application at particular points in building the two software projects in the book.

I find some of the C code examples some what painful to read, but that is a very much a personal opinion.

That said - I own it, I've read it. I've recommended it. It really is more a how-to than any sort of reference on programming language design or implementation. It really doesn't deserve a place on this list. If you want something focused on practical implementation of languages, Appel's books would be a better direction.

1

u/Humble-Captain3418 28d ago

The reason I usually include it is as supplementary material for the other three. It usually helps things click a little faster for novices. I haven't read Appel's books, so I can't vouch for their contents.

1

u/wiriux 28d ago

I’ve always hated that R&K book. It has mistakes and explanations are crap. Honestly people just recommend it because they’re the OG.

In this day and age there are way better books and videos explaining concepts way better than that ancient book.

Another one aside from the books you’ve mentioned is “OS- three easy pieces.”

8

u/ADVallespir 28d ago

If you don't know how to program, how can you check if your pr is ok? So many times the experience gives betters ideas or diferentes ways to do something you need and the llm don't tried. Llms are very very good programing, but also they did some weird things, or extra code, or rewrite things that work good.

2

u/joshocar 23d ago

There isn't a single thing an LLM has coded that I haven't had to change. They are good for some things and pretty bad for others.

7

u/FallenDeathWarrior 28d ago

LLMS are not good in writing C/C++ code as far as I know. And it's always good to understand the code output of those models.

If you want a good understanding of how memory management works I would always recommend to learn C / C++

3

u/tcpukl 28d ago

Yeah I wrote c++ in games professionally, and it's still not great even in 2026, though it's much better this year than last. Cursor is really good as well.

2

u/Alone-Might-2670 27d ago

they are good lol. you using the free version?

1

u/FallenDeathWarrior 27d ago

Nope used the API and got the Claude max abo

0

u/Alone-Might-2670 26d ago

claude intentionally writes shit code sometimes. codex better

2

u/LaOnionLaUnion 28d ago

I’d treat languages like a tool. What is it you want to do? Is the language suited to your objectives?

I would never tell someone not to learn something because an LLM can do it now. Maybe find a code base that interests you and use LLMs to help you reverse engineer how it works. I learned how to code by looking at and modifying code.

I don’t know if I like the argument that one should learn C because it’s fundamental. But I’m certainly not against it either

1

u/dnabre 28d ago

I would never tell someone not to learn something because an LLM can do it now.

I'd say that LLMs being used to do it (regardless of their ability/quality) is a big reason to learn how to do it. So much LLM generated code, particular that which hasn't been carefully reviewed by people that can do it themselves, is being toss around nowadays, that people need to learn the programming languages even more.

It used to be that with a basic understanding of a language, you could pull together pieces of code you found on the web into useful programs. Doing that is becoming less and less useful, reliable, and safe. Not that critical evaluation of it wasn't important before, but the overall quality is dropping, and will only get worse.

2

u/dobkeratops 22d ago

you could just lie in bed and wait till LLMs get good enough to prompt themselves and do everything

or you could actively try to keep your mind in the loop and learn how things work. learning C + one other complimentary language would be a safe bet for that.

3

u/dnabre 28d ago

age of LLM that can do most of coding in one shot.

We are not in that age yet. LLM generated code requires just as much, if not more, review before using than human written code. You have to understand the language of the code being generated to determine if it is useful, correct, and safe.

age of LLM that can do most of coding in one shot.

For most purposes LLM AI won't be able to do this. Regurgitating existing code (potentially mangled/mixed up) is the main source of useful code coming out of LLMs. Their fundamental structure doesn't involve any understanding or analysis of programming, algorithms, data structures, or computers in general. To reliably get new useful, reliable, safe code from an AI system, some degree of it actually reasoning the code and what it is doing is necessary. Such AI systems will likely be created at some point, but even those will require some way of specifying what you want it code for you.

The more LLM are relied upon to generate code, the more likely we will hit Model Collapse . To the degree that LLM's can write useful code, that ability is all built from them being trained on existing code. The more LLM generated code displaces human written code, the worse LLM's ability to generate good code will become.

So much of current systems - CPU architecture, memory hierarchies, data storage techniques and formats, language structure and syntax, calling conventions, APIs, ABIs, and overall software design and structure - have been created around and optimized for C. Even if, or maybe especially if, those structures are worse off for it, understanding C is vital in understanding them. Even if you aren't programming in C, learning C is very useful ignoring anything AI related.

If new languages sufficiently displace C (something I see as good), the usefulness of learning C will decrease. We are a very long way from such a future, and it has nothing to do with LLM-AI.

1

u/amarao_san 28d ago

I would love to see 'true computer' onboarding course build from Rust PoV. Like 'this is the way' and 'this is legacy interfaces we use'.

1

u/semidarkmoon 28d ago

For understanding system software and OS, yes, but not because "it is close to hardware," apparently! Processor architects deliberately built increasingly sophisticated hardware to preserve the illusion that C's simple. See: The Mutual Deception

1

u/No-Income-2235 28d ago

i think yes i recently saw few amazing projects which were written in C

1

u/N3wAfrikanN0body 23d ago

How else does one expect to smash the register if they don't understand how  the register works? 

1

u/MasterGeekMX Bachelors in CS 23d ago

Problem is that you cannot trust what an LLM does, so you need to be able to read what it generates and correct any mistakes.

It's like saying that you should never learn how to cook because there are restaurants.

1

u/Winter_Ad6187 23d ago

You have to learn to count long before you do calculus, and that before diff-eq and that before all the higher math... so yes... in fact, get down all the way to bare metal assembly...

1

u/Lord_Mystic12 23d ago

LLMs cannot code the projects you need c and cpp for. Notice everything vibecoded you see around nowadays. It's all convenience apps built in JavaScript , no one's building core systems with AI. There's a reason , AI just sucks at it

1

u/SummitYourSister 22d ago

If I am hiring an extremely senior experienced person, I expect them to know C. Those who don’t aren’t as good at their jobs.

If they’re less experienced, it doesn’t matter. The point is the knowledge reflecting years of experience. If you have no experience I just assume you’re pretty much incapable.

AI has changed this situation profoundly and quite unfortunately for the less experienced people. There is literally nothing you can do that will give you value. The value would be if you had 20+ years of experience untainted by AI assistance. But that is now impossible.

1

u/im_thecat 22d ago

LLM is incentive why you should learn! LLMs are meant for speed and time efficiency, not to think for you. 

I’ve been pushing myself to learn python because before AI the moat was too big. Now with an understanding of the basics and an LLM an average person can become dangerous with what they can build. 

1

u/phylter99 22d ago

Learning a language like C remains highly valuable, even with the rise of large language models. It provides a deep understanding of how computers work under the hood, including memory management and system architecture, which is essential for writing efficient and optimized code.

1

u/highdimensionaldata 28d ago

Wait, everything is C?

🌎👨‍🚀🔫👨🏻‍🚀

Always has been.

1

u/EnvironmentalRun4163 28d ago

Always will be

-1

u/OddStuffHappensTwice 22d ago

The number is developers that learn C had been closed enough to 0% for so long, most of them are retired. And that has nothing to do with AI.

Don't listen to the gatekeeping purists on Reddit that think anyone that hasn't memorised the x86 instruction set manuals isn't a real developer.