Re: Compiling C++ modules

marty fouts
2006-04-24T21:50:50Z

On 4/24/06, Kyle Moffett <mrmacman_g4@mac.com> wrote:

> What else can C++ do that C can not?

Inheritance, templates...

I would never argue in favor of converting any large existing
application, especially the Linux kernel, from C to C++ by introducing
C++ into part of it; for a lot of reasons, but it is possible to write
a reasonable OS kernel in C++ and take advantage of "C++ as a safer C"
(Koenig) to write clearer, shorter code in a lot of instances.

Unfortunately, it's almost as easy to write bad C++ as it is to write
bad C (Fortran in any language) but we (the community) have a lot more
experience in writing C kernels, so we're more familiar with how to
avoid bad C than we are with how to avoid bad C++.

The existance of Bulwer-Lytton does not disprove that good prose can
be written in English, nor does silly abuse of overloading disprove
that good code can be written in C++.

Oh, and yeah, a = b + c *is* more readable than

a = malloc(strlen(b) + strlen(c));
strcpy(a,b);
strcat(a,c);

and contains fewer bugs ;)