An extract from the FAQ about C++: http://www.tux.org/lkml/#s1-4
"My personal view is that C++ has it's merits, and makes
object-oriented programming easier. However, it is a more complex
language and is less mature than C. The greatest danger with C++ is in
fact it's power. It seduces the programmer, making it much easier to
write bloatware. The kernel is a critical piece of code, and must be
lean and fast. We cannot afford bloat. I think it is fair to say that
it takes more skill to write efficient C++ code than C code. Not every
contributer to the linux kernel is an uber-guru, and thus will not
know the various tricks and traps for producing efficient C++ code."
Object-oriented programming is a good tool. One of many. But it
shouldn't be a religion, nor do you need to write in C++ to make use
of it. A good example of object-oriented programming done in C is the
Xt toolkit.
> Makes you wonder what would happen if someone tried to design a
> minimalistic C++, call it the "M programming language", have be
> close to C with the minimal useful parts of C++ included.
I'm sure lots of people have thought about this. A friend of mine and
I sat down once and did a rough design for the "K" language, which was
supposed to be "exactly like C, only better". Basically, we wanted to
cherry-pick the good bits of C++, plus add some other things. As
usual, lack of time is the enemy. Besides, what's point unless it gets
widely used, and the chance of that is small.
Regards,
Richard....
Permanent: rgooch@atnf.csiro.au
Current: rgooch@ras.ucalgary.ca
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/