Re: C++ pushback

From: Jan-Benedict Glaw
Date: Thu Apr 27 2006 - 03:58:48 EST


On Wed, 2006-04-26 18:00:52 -0500, Roman Kononov <kononov195-far@xxxxxxxxx> wrote:
> Statement expressions are working fine in g++. The main difficulties are:
> - GCC's structure member initialization extensions are syntax
> errors in G++: struct foo_t foo={.member=0};

Erm, you may want to read the current C standard (C99). This isn't an
extension, it's standard.

There's a reason why C++ doesn't support that (yet): C++ is a fork of
C90 (IIRC), so everything that evolved in C during the years is still
missing from C++.

> > Anyway, it should all be doable. Not necessarily even very hard. But I
> > doubt it's worth it.
>
> I think that allowing C++ code to co-exist with the kernel would be a
> step forward.

You can do with your code whatever you want to:) I think it's just a
matter of practice: If C++ code shows up that is less error-prone than
C code, doesn't use unverifyable amounts of stack space during
constructor runs and is basically _superior_ to C code, that'll find
its way into the kernel. But if it's only as good as the C code, then
why should anybody bother implementing the neccessary stuff to link
C++ code (and to initialize it properly?)

MfG, JBG

--
Jan-Benedict Glaw jbglaw@xxxxxxxxxx . +49-172-7608481 _ O _
"Eine Freie Meinung in einem Freien Kopf | Gegen Zensur | Gegen Krieg _ _ O
fÃr einen Freien Staat voll Freier BÃrger" | im Internet! | im Irak! O O O
ret = do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA));

Attachment: signature.asc
Description: Digital signature