Quote:
Originally Posted by jpollard
In compiler construction, name mangling (also called name decoration) is a technique used to solve various problems caused by the need to resolve unique names for programming entities in many modern programming languages.
|
Thanks for that. So, in spite of it's scary name, this is just about adding some characters to class and function names to distinguish between those that would otherwise have the same name.
I'm not convinced that adding a few letters to a function name is going to make debugging that much more difficult and my comments about avoiding bugs in the first place still stand.
Quote:
Originally Posted by jpollard
That is to defeat the name mangling that C++ does.
|
More to the point, it means that you don't have to re-write existing code that is already perfectly adequate. Unless I'm mistaken, you wouldn't even have to re-compile the code.
Quote:
Originally Posted by jpollard
There is no point to using C++ in the kernel if you have to avoid using C++ features.
|
It's not about taking an "everything is an object" mentality nor is it about reinventing the wheel.
There are times when an object would make more sense than just a plain structure - especially when you have many similar structures and the functions that use them as arguments.
The point is that using C++ to write a kernel would give you more options. You could use C++ features where advantageous to do so while avoiding those "features" that are actually "problems".