lkml.org 
[lkml]   [2000]   [Oct]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [OT] Re: Possible C++ safe header project - Re: [Criticism] On the discussion about C++ modules
At 04:37 PM 10/23/00 +0200, Marko Kreen wrote:
>* This will _not_ be accepted into standard codebase. Don't you
> understand? Making headers C++ compatible is the first tiny
> step for doing modules in C++. Yes, from driver/module
> programmers perspective "they almost look same, and I think
> C++ is cooler" they (C/C++) should be compatible, but from
> kernel core's perspective they are whole different languages.

My pair-o-pennies(tm):

First, I agree that C++ has no place in an operating system kernel that has
not been designed from the ground up with C++ in mind. I worked on
kernel-level operating systems written in Pascal and in a bastard version
of Fortran, and I still carry the scars from those experiences. (I do not
have the same reservations about using other languages to write
higher-level OS functions, that stuff that was called "middleware" in the
Microsoft anti-trust case.)

I am also against wrapping all the headers in C/C++ compatibility wrappers
unless there is a damn good reason to. One valid reason, in my view, is to
reduce the number of headers by reusing userland headers for kernel code
where appropriate and useful -- observing the rule that you should never
define anything more than once unless there is a damn good reason not to.

Where Marko and I part company is in the thought that removing C++ keywords
from kernel headers is something to avoid. I'm not talking about enabling
C++ programming, I'm thinking that this may be forced by our tools on down
the road. More and more C compilers are interpreting C++ language syntax,
and it won't be long before you won't be able to switch off the recognition
of C++ stuff when compiling C. After all, the compilers have to deal with
the same bloat problem that we face in the kernel.

Linus has the final say, of course, but to suggest that any changes that
remove name collisions between C and C++ be rejected out of hand has the
potential for shooting ourselves in the foot. I'd rather do it slowly
*now* instead of having to do it wholesale when the tools force us.

Not to satisfy the C++ people. To insure ourselves against obvious tool
changes.

Satch

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:41    [W:0.062 / U:0.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site