lkml.org 
[lkml]   [2006]   [Apr]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Compiling C++ modules
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 ;)
-
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/

\
 
 \ /
  Last update: 2006-04-24 23:53    [from the cache]
©2003-2011 Jasper Spaans