Re: Compiling C++ modules

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 4/24/06, Kyle Moffett <[email protected]> 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 ;)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux