6 ms·
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
by chimeracoder 15y ago
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.
- redthrowaway 15y agoIn 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.
- icebraining 15y agoHe might not know C, but the creators of Go certainly do, so don't let this post discourage you.
- unimpressive 15y ago> But the creators of go certainly do. The only person who knows C better than the lead designer of go. (Ken Thompson IIRC.) Is in a casket right now. EDIT: I didn't mean that in a ill-spirited tone. I'm just pointing out that the people working on go are the best alive.
- Arelius 15y agoI 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.
- unimpressive 15y agoI'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.)
- Arelius 15y agoI'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.
- technomancy 15y ago> 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 http://gazagnaire.org/pub/SSGM10.pdf
- el_presidente 15y agoThe 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.
- plantain 15y agoNot the hypervisor, just the management tools.
- inoop 15y agoSingularity is written largely in (a superset of) C#: http://research.microsoft.com/en-us/projects/singularity/ http://research.microsoft.com/en-us/projects/singularity/