Re: ideas

Brian M Grunkemeyer (bg2k+@andrew.cmu.edu)
Mon, 6 May 1996 23:26:19 -0400 (EDT)


Excerpts from internet.computing.linux-kernel: 5-May-96 Re: ideas by
Alan Cox@lxorguk.ukuu.or
> C++ code is currently slower and has buggier output than well written C (
> especially as certain people bother to peek at the assembler output). Unless
> the g++ walking volatile bug has finally been fixed its also not
> usable. Finally g++ eats memory - forget building on an 8Mb machine with g++

Ok, those are good temporary reasons to not use C++. Those problems
should improve or eliminate themselves over time, when we might want to
change our minds. But until then, how about making the kernel
_compilable_ under C++? The advantages in the stronger type checking
alone should be more than enough reason to periodically compile the
kernel w/ g++ to make sure there aren't any subtle type errors. In a
project like this where everyone's submitting patches randomly, it is a
good safety measure. There's even a chance it could improve some code
by pointing out which parameters weren't used in a function. While it
doesn't guarantee good code, it does prevent sloppy code from causing
problems.