Re: C++ in kernel

Marcin Dalecki (dalecki@cs.net.pl)
Tue, 12 Jan 1999 17:46:21 +0100


"Theodore Y. Ts'o" wrote:
>
> From: "Alexander Vlasenko" <ukrgym@ilyichevsk.odessa.ua>
> Date: Mon, 11 Jan 1999 22:09:46 +0200
>
> In my opinion C++ can be used as cleaner and safer C.
> C++ has lots of really useful features.
>
> Features that help catch errors early:
> * const pointers
> * private struct members
> * stricter type checking
>
> Features that improve code safety:
> * constant variables (safer than #defines)

Constant variables can be easly emulated in GCC too,
by using initialized non named enums. Like for example:

enum {
my_const = 1024
};

In fact this already happens here and there. However it could
be used more consequent through the kernel...

Marcin

-
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/