Re: C++ pushback

Sam Ravnborg
2006-04-26T21:37:12Z

On Wed, Apr 26, 2006 at 09:19:09PM +0100, Al Viro wrote:
> On Wed, Apr 26, 2006 at 01:09:38PM -0700, Linus Torvalds wrote:
> > The real problem with C++ for kernel modules is:
> >
> > - the language just sucks. Sorry, but it does.
> > - some of the C features we use may or may not be usable from C++
> > (statement expressions?)
> > - the compilers are slower, and less reliable. This is _less_ of an issue
> > these days than it used to be (at least the reliability part), but it's
> > still true.
> > - a lot of the C++ features just won't be supported sanely (ie the kernel
> > infrastructure just doesn't do exceptions for C++, nor will it run any
> > static constructors etc).
>
> - a lot of C++ advocates agree that some subset could be used sanely,
> but there's no agreement as to _which_ subset would that be.
The original question was related to port existing C++ code to be used
as a kernel module.
Magically this always ends up in long discussions about how applicable
C++ is the the kernel as such which was not the original intent.

So following the original intent it does not matter what subset is
sanely used, only what adaptions is needed to kernel proper to support
modules written in C++.

But I have seen no patches this time either, so required modifications
are yet to be identified.

Sam