Originally Posted by
Elysia
Oh, but this isn't about the C++ mindset. Obviously going awry with OOP design with heavy reliance on virtual functions and temporary objects is going to hurt performance. No, I agree with you that one has to be careful inside a kernel.
However, we are trying to convey the message of C++ as the language. C++ is a better C in many ways. As long as one is aware that one is working with hardware, one can use any language suited to the task.
Heard of Microsoft's little research project Singularity? It's not written in C. And yet, it works, and it works well, I'd probably say. For a research OS anyway.
The point is that you must separate the mindset from the language. Separate design from language. Just because you use C++ doesn't mean you have to use OOP, exceptions, polymorphism, etc.
You can just use, say, templates and the better type system. What you need, or should, use depends on the requirements of the project. Naturally you also base the choice of language around this.