4 ms·
> From my point of view what counts is actual kernel development. If you are going to develop kernel because it uses cool new language but you would not if it w
by lmm 5y ago
> From my point of view what counts is actual kernel development. If you are going to develop kernel because it uses cool new language but you would not if it was still C, you are probably not the right person.
Why's that? C is a tedious language that makes you do so much manual bookkeeping, I don't think I'd ever write it again (if I needed C for some reason I'd write a program to generate it for me rather than doing it myself). I think any decent developer would be put off by C to some extent. Sure, the people who really want to make a kernel may put up with it, but an arbitrary enthusiasm barrier is not the way to attract good contributors.
- lmilcin 5y agoOn the other hand C is simple language, there are no discussions about how to do something in C between people who know C. C is tedious but kernel programming isn't about spewing vast amount of code anyway. It is more important to be able to read it, understand it and ascertain it is correct. This is one of main reasons for why C++ is not there.
- adwn 5y ago> C is simple language Except for, you know, all that Undefined Behavior stuff, which makes it practically impossible to write correct programs even for very skilled developers, or the lack of abstractions, which makes it hard to safely re-use advanced data structures. "C is a simplistic language" would be more accurate.
- VLM 5y agoC encourages simplicity. Code is either clear and simple, or extremely obscure and safe, or kinda in between is complicated but not complicated enough such that its not safe. "Simplicate and add lightness" aerospace mentality people like C. At some point any project expected to do ever more complicated tasks, like a kernel, will be unable to use simple C and will have to take the hit of a more complicated language. Simple is good when matched to simple tasks; my microwave oven or TV should ideally never data network with the external world and never malloc memory and never do string processing. C makes an amazing toaster or car automatic transmission controller.
- tremon 5y agoC is simple only as a pseudocode language, i.e. to reason about the happy flow. As soon as you start adding corner cases and error handling, all your happy flow code now gets obscured by numerous ifs, switches, and ($deity forbid) goto statements. Then, add pointers masquerading as output parameters, pointers masquerading as arrays, and pointers masquerading as pointers and your language isn't so simple anymore.
- ClumsyPilot 5y agoFlintlock pistols are simple, do you think they are more reliable or easier to use than an AK-47? Which one would you rather defend yourself with?
- pjmlp 5y agoC++ is definitly there, just not on Linux.
- FpUser 5y ago>"I think any decent developer would be put off by C to some extent." Call me indecent. I use C for firmware development running on small microcontrollers and consider it perfect for this particular task. Not put off by C for this task at all.
- young_unixer 5y ago> I think any decent developer would be put off by C to some extent. Any decent developer would be put off by any language to some extent. Personally, I'm more put off by Rust than C (they put me off for different reasons). Currently, the one puts me off the least is Zig, but it still has many details that I don't like.