Skip to main content

Is C still a programming language or a protocol?

C is so omnipresent that other languages cannot achieve success without dealing with it. The language is the foundation of the world’s most important software and thus transcends itself.

Many programming languages are better, safer and simpler than C; but that doesn’t make them more popular. Moreover, popular newcomers like Rust find it impossible to simply break free of C. After all, applications rarely exist in completely isolated environments, and that’s where the shoe pinches. Your application runs in an environment and may want to interact with input from users.

1. Everything is C

Is that environment Windows-based? The bulk of Microsoft Windows’ kernel is written and developed in C. To talk to that operating system, your application would better understand some C.

On to Linux then? While Linus Torvalds is pushing this operating system more and more in the direction of Rust, the kernel is again written primarily in C. There will probably be a slow shift in the coming years, though. The same story applies to Android, which is ultimately based on the Linux kernel. Google encourages the use of Rust in Android, but the base code remains C-based.

Is Tim Cook doing better? Not really. OS X’s kernel is also a C product. As with Linux and Android, you can extend the line to the mobile implementation: iOS relies on C. Even in the world of databases, it is impossible to escape C (or C++), which powers the Oracle Database, as well as MySQL, MS SQL Server and PostgreSQL.

2. No language without FFI

That is the world in which modern languages such as Rust, Swift and Python grow up and they must conform. To make themselves useful on the world’s major operating systems, languages need to be able to invoke functions and routines from those platforms. A foreign function interface (FFI) allows an application written in one language to interoperate with an application written in another language. An FFI gives a high-level language the ability to interact directly with a C environment, without API.

No language can mature without FFI that allows direct interaction with C. That reality comes with its own basket of problems, as C is not exactly the easiest language to translate from; but high-level programming languages all have their own solution that gets the job done. A C-FFI is a must-have.

3. The English of programming languages

Mature applications sometimes like to talk to more than just the platform they run on. It’s perfectly possible that apps written in two less ubiquitous modern languages need to interact with each other. The question then is whether an FFI is provided. The convenience solution beckons as a kind of Belgian compromise.

The working language between a Flemish-speaking and a French-speaking colleague is all too often English; a language that virtually everyone speaks. The same goes for the world of programming. Why should applications not communicate with each other in terms of C? After all, they can already do that.

As such, C becomes more than a language. As to whether this is a good thing, we’ll leave that open to debate, but C today has evolved into a kind of protocol. Every language and application must speak C for the sake of legacy, making C a safe language for everyone to communicate in. C is the English of programming languages.

Do you also believe that C rules the world (or not)? Then CHRLY Portugal needs your skills. Check out our job openings and apply today.

Leave a Reply