Why C Isn't a Programming Language Any More

image

The C programming language has many problems. But now the Registers notes that “Aria Beingessner, a member of the teams that implemented both Rust and Swift, has an interesting take… That C isn’t a programming language anymore…”

And it hasn’t been for a long time,” Beingessner writes in an online essay:This isn’t about the fact that C is actually horribly ill-defined due to a billion implementations or its completely failed integer hierarchy. That stuff sucks, but on its own that wouldn’t be my problem.

My problem is that C was elevated to a role of prestige and power, its reign so absolute and eternal that it has completely distorted the way we speak to each other. Rust and Swift cannot simply speak their native and comfortable tongues — they must instead wrap themselves in a grotesque simulacra of C’s skin and make their flesh undulate in the same ways it does…

Everyone had to learn to speak C to talk to the major operating systems, and then when it came time to talk to eachother we suddenly all already spoke C so… why not talk to eachother in terms of C too?

Oops! Now C is the lingua franca of programming.

Oops! Now C isn’t just a programming language, it’s a protocol.
The Register picks up the argument:it’s fair (if wildly controversial) to say, as this 2018 Association for Computing Machinery paper puts it, that C is not a low-level programming language. As its subtitle says: “Your computer is not a fast PDP-11.”

This is not a relative assessment: that is, it’s not saying that there are other programming languages that are lower-level than C. It’s an absolute one: C is often praised for being “close to the metal,” for being a “portable assembly language.” It was, once, but it hasn’t been since the 1970s; the underlying computational models of modern computers are nothing like the one that C represents, which was designed for a 1970s 16-bit minicomputer.
The Register summarizes what happens when a language has to interface with an operating system — and thus, that operating system’s C code.[I]t has to call C APIs. This is done via Foreign Function Interfaces (FFIs)… In other words, even if you never write any code in C, you have to handle C variables, match C data structures and layouts, link to C functions by name with their symbols…

The real problem is that C was never designed or intended to be an Interface Definition Language, and it isn’t very good at it.

4 Likes