What If the Bricks of Your Computer Vanished?
What if the bricks used to build your house suddenly decided to vanish because they thought you weren't using the hallway enough?
For decades, computer experts used a language called "C" to build the most important software on Earth: Operating Systems. An operating system is like the brain of your computer; it’s the master program that tells the screen, the mouse, and the battery how to work together.
The Rise of a "Robot Translator"
In the beginning, C was like a high-level assembler. An assembler is like a direct translation book that turns human words into the secret "1s and 0s" code that computer chips speak. It was simple, tough, and did exactly what you told it to do.
But then, the people in charge of the official "rules" for C (a group called ISO) started changing things. They wanted to make programs run faster and faster. To do this, they gave the compiler—which is like a robot translator that turns a programmer’s typed instructions into a finished app—the power to make its own guesses.
Victor
Yodaiken
The ISO approach of delegating to the compiler, not the machine, has damaging effects on reliability and expressive range for OS programming.
The Glitchy Pit: Undefined Behavior
A Dangerous Assumption
The problem is that these "rules" are now full of something called Undefined Behavior, or UB. Think of UB like a "Do Not Enter" sign in a video game that leads to a bottomless glitchy pit.
If a programmer writes a tiny mistake that leads to UB, the modern compiler doesn't just give a warning. Instead, it "reasons backwards." It assumes that because you are a "good programmer," you would never step into a glitchy pit. Therefore, it decides that any code leading to that pit must be useless and just deletes it entirely.
A Real-World Consequence
This can be scary. In one case, a compiler deleted a security check in the Linux kernel—the heart of millions of computers—because it assumed a certain error could never happen.
The Speed Trade-off
The experts found that all this "guessing" doesn't even help that much. A special translator called CompCert doesn't use these risky guesses, and it is only 7% to 12% slower than the most aggressive version of GCC (a popular compiler).
In fact, about 80% of the speed we get from GCC comes from just two simple steps: Register Allocation and the Combiner. These are like neatly organizing your LEGO bricks so you can grab the ones you need faster, rather than trying to predict the future.
The Minefield
The official rules for C18 now have a 10-page list of these "glitchy pits." For builders making the "brains" of our computers, the language has become a minefield. Many now have to turn off the "smart" features of the compiler just to make sure their code stays safe and stays put.
The Lingering Debate
The Core Tension: Scientists are still debating exactly how much speed we would lose if we stopped using these risky guesses in every type of program. While these tricks might help massive data centers crunch big numbers, they are making it harder and harder to build the basic systems we rely on every day.
Source: Yodaiken, V. (2021). "How ISO C became unusable for operating systems development." 11th Workshop on Programming Languages and Operating Systems (PLOS ’21). DOI: 10.1145/3477113.3487274.