Hacker News new | ask | show | jobs
by DaveMebs 5558 days ago
Your point is valid and well taken, but I would like to call out that 1) I specifically mention the use of optimizations as impacting my argument, and 2) I did not mention gcc. I completely agree that for system programming you "have to understand exactly how your black box works," however, I would argue that even if this is technically possible in C++, the cost is prohibitively high. The mapping between C code and machine code is fairly straightforward, /unless obfuscated by compilers and runtimes/.

I fundamentally disagree with the notion that you can write /good/ kernel code in a HLL. A kernel is ALL ABOUT interacting with the hardware and performing low level system management. Sure, you could write kernel code in a HLL, but it is just not going to be as performant as if you wrote the code with "the super low level details" in mind. These are important considerations that compilers do not have insight into. I would go on to argue that to anyone who understood the low level details required to write quality kernel code, those details are not something they wish to overlook. Anyone who doesn't understand those details shouldn't be writing kernel code.