JZ
Back to all writing

NoteNovember 22, 20261,359 words7 min read

C: The Atom of Modern Computing

This is intended as an explainer post, as I felt it would be nice to explore a topic that's getting drowned out by the ocean of (albeit justified) AI hype. I first experimented with C around 2018 (8 years ago) and found it relatively simple and complex at the same time. I think most people have the same experience, because it is only natural when you consider C’s design. It has few keywords and small syntax, but provides minimal safety nets and is difficult to use correctly in practice. Unlike most major modern languages such as Python or Go, you must manage memory yourself in C. Pointers are also easy to get wrong, and mistakes easily cause undefined behavior instead of clear, obvious errors. In simpler terms, writing C is like packing your own parachute. The materials are simple, and nobody checks your work. A bad fold can look exactly like a good one, and you only find out at 10,000 feet. Pack it right, though, and it opens safely every time. Still, C is often referred to as the king of all programming languages. Elon Musk recently shared that SpaceXSI has rewritten its entire reinforcement learning and inference stack in C, with a little bit of C++.

Before I explain more, we should understand a bit of C’s history. Before C, programmers primarily wrote in assembly languages. An assembly language allows for direct control and manipulation over hardware, as each assembly command translates directly into a machine code instruction executed by the CPU. Such languages are referred to as low-level and are the hardest languages programmers will ever touch. Different CPU architectures (x86, ARM, etc.) have different instruction sets, and therefore different assembly languages. Higher-level (more abstracted) languages such as Fortran (1957) and COBOL (1959) already existed before C, but most operating system kernels were still written mainly in assembly. Because of this, operating systems had to be rewritten for every different or new type of machine. In 1969, Ken Thompson at Bell Labs created the B programming language, a stripped-down version of an older language called BCPL. Between 1971 and 1973, Dennis Ritchie developed C by extending the capabilities of and improving B. Then, in 1973, Ritchie and Thompson rewrote the Unix kernel in C, which made it far easier to move Unix to new hardware.

You can think of it like physics. If machine code and assembly languages are the subatomic particles of the universe, C can be thought of as the atom. Atoms are made of quarks and leptons, but they’re the first unit you can actually build with in practice. The molecules, in this analogy, would be almost every modern programming language. Python, Bash, Ruby, PHP, Perl, and even Go were all originally implemented in C. In fact, the main implementations of all of those languages are still mostly written in C today, with the exception of Go, which became self-hosting in 2015. Even languages that aren't written in and never were written in C, like Rust, still indirectly depend on it, because most languages call each other's code using C's rules for passing data between functions. The kernels of Linux, Windows, and macOS are still largely written in C. You can build endless molecules, but they all end up still being made of atoms, one way or another. This is a large part of why C stays king, at least in spirit.

Now, other than the fact that C is essentially a fundamental building block for most high-level programming languages, there are other reasons for why C is so loved by many, with speed being the most obvious reason. A lot of languages, including C, compile directly to machine code, but unlike C, many of them also run extra code alongside your program. Go, for example, ships with a runtime that includes a garbage collector, using CPU time and occasionally pausing your program briefly to free memory you no longer need. The Go compiler also inserts a check before many array accesses to make sure the index is in bounds. C does none of this. Memory is freed only when you call free(), array accesses are never checked, and the only code added to your program is a small startup routine. Nothing runs that you didn't ask for. This is why benchmarks often use C as the baseline other languages are measured against, and why a company like SpaceXSI would rewrite its AI stack in it. C is also everywhere. Because the language is small, a C compiler is usually one of the first tools built for any new processor, so C runs on nearly everything, from supercomputers to the chips inside cars, microwaves, and medical devices. Those chips, called microcontrollers, often have very little memory. The one in an Arduino Uno has just 2 KB of RAM, far too little for languages that need a large runtime, so microcontrollers are mostly programmed in C and, to a lesser extent, C++. Finally, C barely changes. Its first official standard came out in 1989, and the few revisions since have rarely broken existing code, so programs written decades ago often still compile today with little or no modification.

Now, it should go without saying that great power comes with great responsibility. The same freedom that makes C fast and simple can also make it incredibly dangerous, as I implied earlier. C will let you read or write past the end of an array, use memory after you’ve freed it, or free the same memory twice, and none of these will necessarily crash your program. Instead, they will silently corrupt memory, or expose data that was never meant to leave. This is exactly the kind of mistake that produces security vulnerabilities. When attackers find and use one before the developers know it exists, it’s called a 0-day because the developers have had zero days to fix it. A quite famous example is Heartbleed, a 2014 bug in OpenSSL, the C library that encrypts traffic for a large share of the internet. The developers forgot to check one length value, and by sending a heartbeat message that claimed to be longer than it really was, an attacker could make a server send back up to 64 KB of its own memory per request, which could easily include sensitive data like passwords or private encryption keys. This wasn’t a rare or one-time thing. As I’ve attempted to make clear, C’s freedom can be dangerous. Very dangerous. Microsoft reported that about 70% of the vulnerabilities it assigns a CVE to each year are memory safety issues, primarily in its C and C++ code. The problem is serious enough that the US government’s cybersecurity agencies (CISA, the NSA, and the FBI) now publicly urge companies to move away from writing C and C++ code and toward more memory-safe languages.

I believe that C had an enormous historical role that cannot and should not be forgotten. However, for most new code, I believe we should move toward memory-safe languages like Rust. Rust compiles to machine code without a garbage collector, so its performance is usually close to, and sometimes equal to, C's, and it catches most memory errors before the program ever runs. Rust also lets programmers mark code as unsafe, allowing for flexibility and freedom as needed. Bugs can still hide in unsafe code, but even so, after Google began writing new Android code in Rust, memory safety bugs fell from 76% of Android’s vulnerabilities in 2019 to under 20% in 2025. The results speak for themselves.

So, is C still the king of programming languages? In a sense, it always will be. It’s the atom that most of modern computing is built from, directly or indirectly, and it still runs the operating system kernels, language runtimes, and tiny chips the world depends on. But, being foundational does not mean it should be the default; it only made sense to pack your own parachute when it was the only option. Now that we have one that checks most of its own folds, most of us should use it, and save C for the places where nothing else feasibly fits.