Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Beats me. I didn't say the existing kernels were C++. I said if I wanted to write a new one it would be in C++. I certainly know the existing kernels are C++. Some of the kernel code for popular Operating Systems -- in production now -- goes back 30 or 40 years.

If I'm not mistaken, the Windows kernel has evolved quite a bit to C++. Even the core C files are compiled using the C++ switches. Not sure, but not relevant to my point either.

Hope this discussion helps the poster, which is the goal here. Like I said, you made some great points, and I agree with quite a bit of what you wrote. But understanding the exceptions and edge cases are important, even if the guy doesn't choose C++.



The reason why you probably would want to write your kernel in C over C++ is that C++ does more 'under the hood' and when you're writing an OS you want to have your code as transparent as it can possibly get. Any side effects that are not explicitly mentioned in the code will get you burned at some point.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: