Monday, October 22, 2007

Respect C Programmers

During last few weeks I noticed quite a few blog articles and online discussions dedicated to something awful: bashing C as a language and C programmers who still use it and especially those who LIKE to use it. The bashing seems to be coming primarily from adepts of higher-level languages, filled with self-proclaimed superiority mixed with camouflaged attempts to proclaim the other side stupid. Even well recognized C hackers like Torvalds got their share of criticism in a rather rude manner.

And I have a big problem with that.

But before I explain myself, lets look closer what high-level language geniuses have to say. Summarizing, it predictably sounds like C is too low level and using it in 2007 is like programming in assembly language which is Forrest Gump stupid. More specific drawbacks of being so bare metal include but not limited to the following statements:

Programming in C is too slow and unproductive.
C programmers by default are performing premature optimization.
C-style of memory management is inferior to automatic garbage collectors found in modern VM implementations.
C programs have more bugs in them.
C programs are prone to security vulnerabilities.
C programmers write too many for loops and look stupid doing it.
C is not that fast. Actually Java is almost as fast now!
C programmers are not cost effective and picking C as a language of choice is bad business decision.

You can have a full blown argument for each of those bullet points but I won't. Instead, I want to point your attention to something else.

Dear Haskell People...

You see, most of you Haskell/Lisp/Erlang gurus are true intellectuals and are very capable. You write very well: many great “functional-style programmers” like you have nicely written blogs filled with sacks of good thoughts and ideas.

However, when I look around I rarely see any results of your work. I browse APT repository on Debian, sometimes I check out various shareware for Windows, I follow promising software reviews. I see interesting new projects pop up here and there, and almost everything is done in C. Maybe it is just me, but most of the software I'd personally use on my computers is written in that retarded and unproductive language you dislike so much.

I am counting real software, not software jobs. Because, as many of you already know, most software jobs exist out there solely to produce boring crap around SQL server of some sort for the enterprise with very few exceptions. That's the enterprise software forya. People still use it, but only if you pay them salaries. Here I want to concentrate on software people actually want to use themselves. Even pay for it. Real dollars, you know? And I don't see much of that written in higher level languages, let alone functional ones.

Moreover, looking around I can't help but notice that somehow those "stupid and ignorant" C programmers managed to build everything that powers the Internet and computers in general: GCC, Apache, Operating systems they run under, numerous tools, Gnome+friends, Doom, system utilities and personal money managers - the list is huge. Nearly everything is written in C. And it's not just legacy: if you focus on projects started within last 5 years the picture will not change much.

Meanwhile, higher-level language intellectuals produced very little. On my Ubuntu desktop I do not believe I have a single piece of software written in Haskell or Lisp. I tried Eclipse but continued looking for something usable until I discovered Vim. Even mighty Python has mostly been kept as a tool to write helper scripts as more powerful replacement for bash. I am not saying there aren't any programs written in higher level languages, I am just saying that ratio of C-to-everything-else is profound.

Why is that? Haskel/Lisp hackers, I enjoy reading books you write, blogs you maintain and I find your comments on most programming topics on slashdot very insightful. However, if your language is so superior and it makes you guys so much more productive, why don't you flood us with actual software written in it? Besides your own server-side web applications? I see so many articles and tutorials that end with "WOOW in 5 lines of code!" or "WOOW re-written in less than a week!" that it seems that all that increased productivity and your superior intelligence should compensate somewhat for your smaller number of heads.


Meanwhile, C programmers just get things done. This is why survival of any new high-level super language will always depend on having a reliable and easy interface to C. Why? Because the entire world is written in C by guys who are too busy coding and do not have time to bash cocky Haskell people in their blogs.

Peace. Respect. Love.

No comments:

Post a Comment