"J . A . Magallon" <[EMAIL PROTECTED]> said:

[...]

> But there are some features of C++ that would be of great value for kernel
> development (in general for imperative programming), for example:

> - <const &> args : dont break your untouchable data, and get rid of
>   pointer mess

It isn't _that_ bad. Besides, this "pointer mess" is ingrained in each C
programmer by now, to change that will get you hard to see bugs.

> - for (int i=0; ...) : don't use index outside loop

Rather trivial.

> And simple member functions are also fine, they impose NO call overhead
> and simplify the use of structs (hey, you can define structs with member
> funcs in C++, they dont have to be classes).

A struct in C++ is a class where the default visibility is public, nothing
else. And they _do_ impose an overhead via indirection to get the function
(they are essentially a function pinter in the struct) plus passing the
self pointer, which may need adjustment for bases and such. Trivial, but
could be important some places.

> So the base C++ is fine, its organized C. Esoteric features make the 
> difference.

And are the stuff that makes C++ worthwile in the first place. I've written
very little C++, but being able to draw upon STL is mindboggling, but you
easily loose sight of what is going on behind the scenes.
-- 
Horst von Brand                             [EMAIL PROTECTED]
Casilla 9G, Vin~a del Mar, Chile                               +56 32 672616
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/

Reply via email to