Friday 25 May 2012

The Linux Kernel

Aaah. Another day, another discussion about how badly C sucks. Today I'm going to counter one of the most often-used arguments in the field, which is amazing because of how poor it is.

"But the Linux kernel was written in C!".

This is a complete fallacy- appeal to authority, specifically.

In order for this to be true, you would have to prove firstly, the Linux kernel is of significant quality. I mean, it's assumed in the argument that the Linux kernel is something you'd want to emulate, but I've seen no evidence that it's actually of noteworthy quality.

Secondly, that the Linux kernel was developed with a reduced cost (bearing in mind it's quality), because after all, anything could be good if you plough in a billion man hours.

And thirdly, that this was because it was written in C. If you happen to hire a bunch of incredible engineers, just for example, then they probably could build a quality work for little, even in a bad language.

As there are few, if any, major kernels written in any other language except C, there's basically no possible comparison, which eliminates the idea of there being an actual argument to be found here.

Of course, at the time, there was hardly anything *else* to use, even for general-purpose programming. This makes it exceedingly irrelevant that the Linux kernel is written in C. Not to mention the fact that kernel mode is definitely a distinct area of programming, like embedded, where the rules are different to that of general-purpose programming. As a niche, what's useful or advisable here is not very applicable to the general world.