Re: linux headers and C++

Jamie Lokier (lkd@tantalophile.demon.co.uk)
Mon, 5 Jul 1999 17:23:04 +0200


Jes Sorensen wrote:
> The point here is that you should not try to use C++ features inside
> the kernel, ie. things like exceptions are not meant to be used within
> the kernel as you do not know what it will do to your stack etc. Again
> the kernel is written in C, let it stay like that.
>
> Forcing people to write kernel code in C like this actually prevents a
> lot of nasty disasters that will be hard to debug.

Sure, force this be only allowing C code in the kernel and its device
drivers. I'm 100% for that.

But why disallow a third-party kernel-space application from using C++
if they want to? We're not talking about the kernel, we're talking
about third-party code that will never be part of the kernel.

C++ has a lot of useful compile-time features -- you don't need
exception handling. Classes being the obvious one. (In fact I've
written C++ for many years and _never_ used exceptions).

Though perhaps C++'s most useful feature for third-party code is that
there's a lot of it already written for user-space and other OSes.

-- Jamie

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