lkml.org 
[lkml]   [1996]   [Aug]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Linux Kernel / C++
From
Date
> 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


\
 
 \ /
  Last update: 2005-03-22 13:37    [from the cache]
©2003-2011 Jasper Spaans. Advertise on this site