Pure C++ Linux Kernel
What would be the benefits and drawbacks of a kernel, linux for example, written entirely in c++, as opposed to c? The only drawbacks I can think of is that a c++ kernel would take more code, and might run slightly slower than a kernel written in c. A c++ kernel would also be much more complex, but I think that is also its greatest attribute. I think a c++ kernel would allow for tighter integration of software written in c++, and other object-oriented languages such as java, ruby, etc. I opt for doing away with c alltogether because I think every aspect of the O.S. should be object-oriented. Another benefit would be the ease of porting code from one O.O. language to another. Integration of elements of the kernel, and other programs that are written in O.O. languages would be more seamless and tightly integrated. I also think that fuzzy logic and a.i. would be easier to implement with the O.O. coding style. And I think one of the most important benefits would be a standardization initiative. Having all system and application code written in the O.O. style would allow for great familiarity of all code you will ever encounter, more managable, and better learning curve esp. for new programmers, or programmers only familiar with one O.O. language.
Linux: C++ In The Kernel? | KernelTrap
I think basically, C++ is a little too high-level to be a good idea, plus Torvalds flames anyone that suggests it :P.
As I have read and think: it's not usually a good idea to use a language that manages its own memory in a kernel, I also agree with Torvalds when he says that C++ compilers can't be trusted, they simply take your code and do whatever they think is what you want, it's not predictable enough for a kernel