If C isn't suitable for projects with more than 10K lines, then praytell, what language should my kernel be written in?
I've been meaning to try Go for a while (the fast compile times alone intrigued me), but this type of post really just puts me off - if you're telling me that C isn't suitable for large projects, then that tells me you may not know C well enough to make that judgement.
> If C isn't suitable for projects with more than 10K lines, then praytell, what language should my kernel be written in?
The Xen hypervisor (which shares a lot of characteristics with an OS kernel) is written in OCaml, which seems to have proven a good choice in practice: http://gazagnaire.org/pub/SSGM10.pdf
The problem with OCaml is that you need to recompile every library you use whenever you update the compiler; even minor versions. You might be able to use it for any program, but not for every program.
I know who Ken Thompson is, and don't so much disagree. But that is a bold and oft-repeated statement, that seems to not be fully supported by the evidence.
I'll concede that the former project lead for Unix might not be the best C programmer.
But then; who is?
If there's evidence to support that there's someone who knows it better than Ken, I personally would like to see it. (More from curiosity than anything else.)
I'm certainly not qualified to answer. But there has certinally been some very impressive code written by people who spend a huge amount of their time in game development, kernel development, or any other large system that is written exclusively in C.
Frankly, even if Unix was that project, I'd expect that the "best" C programmer may actually be someone who is in a much visible position.
Then again, Ken may very well be the best C programmer, but Go doesn't much seem like a language designed to address the issues that C is currently being used to address. Frankly, it seems like a much better Java replacement IMO.
In general, he's right. Kernels and some other applications that require low-level access are an exception to the general rule that C is not a good language for massive projects.
I've been meaning to try Go for a while (the fast compile times alone intrigued me), but this type of post really just puts me off - if you're telling me that C isn't suitable for large projects, then that tells me you may not know C well enough to make that judgement.