Re: Linux Kernel / C++

Jan-Patrick Perisse Sys. Admin (msmith@quix.robins.af.mil)
Fri, 2 Aug 1996 08:35:09 -0400 (EDT)


> Is it feasible to have the kernel compile just as cleanly if the compiler
> is set to g++ instead of gcc? My guess is it can be done but it would take
> an enourmous amount of changes to do it, and to have it compile cleanly.
> Has anyone considered moving the kernel on to C++? I'm not saying using

This was already done once, I think in the 1.1 versions?
It was decided by people who matter that it would be easier for the
larger group that works on it to go with straight C.

> objects and streams and all, that would require a complete rewrite of the
> kernel and probably end up really slow anyway.. I just think it would be

While there is truth to part of that, its very general to say it would
end up slow with C++. Sure, with bad design and overuse of virtual
functions it would be slower. A good class design, however, is virtually
identical to C. If constructor overhead is too much, it is bypassable
with custom allocators.

Although I've not written a module, I don't see why you can't write your
module in C++.

Melvin Smith