why c is still on top

C is TIOBE's programming language of 2017, 46 years after its first release.

Sometimes it’s amazing to me that we still write stuff in C. C++ came along in the early eighties and good ol' C isn’t going anywhere anytime soon.

Lately I’ve done a bunch of web development. Now, the web is way overextended at this point. Today, it’s a technology that does way more than it was ever designed to. Chances are you’re reading this on a phone. If you’re not reading this on a phone, you may be reading it on a “mobile device” filled with – you guessed it – phone components.

This is a far cry from the web’s original design, and even further from the old TCP/IP suite that keeps the intertubes duct-taped together. Conisder this, though: C has actually aged more gracefully than Web technologies. C hasn’t really changed much since K&R second edition, aka ISO C89.

Sure, sure, there’s C99, and C11, both of which are unwhelmingly represented by compiler writers; most modern C language features are implemented by way of compiler extensions. Microsoft is the worst offender here. They really want you to use C++.

In spite of terrible compiler support, an include file system fully rooted in 1978, and a reputation for being difficult to write well, many developers still choose C. Why? Amazingly, C was the TIOBE index programming language of 2017. Why, when you can choose C++, Java, Python, Ruby, Perl, OCaml, NodeJS, Basic, Logo, Whitespace, and dozens I was too lazy to write, would you choose a language as old as C?

I would guess simplicity. C is simple, and not just to write. A good C compiler can be quite simple (or as simple as a compiler can be.) C program can be written without a lot of necessary libraries, but you can be an app written for say, Electron, will be pretty hefty.

A lot of people use the word “elegant” to describe C. Perhaps we could even say “refined,” though not in a stuffy way. C has a long lineage, even before it was called C. It represents at least 40 years of language design, and for that reason, it is still the best tool for many jobs.

I wish I could develop for the web in C. Sigh…


Posted on Mar-4-2018.
filed under: c programming