Re: linux headers and C++

Frank Butter (fbutter@ottomall.com.tw)
Tue, 06 Jul 1999 16:56:18 +0800 (CST)


On 06-Jul-99 Jes Sorensen wrote:
>>>>>> "Jamie" == Jamie Lokier <lkd@tantalophile.demon.co.uk> writes:
>
> Jamie> Albert D. Cahalan wrote:
>>> Linux already uses more than a C compiler offers. The best answer
>>> would be to merge gcc and g++, using a config file to enable the
>>> features that Linus approves of. Linux could use "C+" then.
>
> Jamie> One of the reasons Linus stopped using g++ on the kernel was
> Jamie> the quality of the generated code. I gather g++ generates much
> Jamie> better code now.
>
> Jamie> It'd still be important to disable exceptions (for example).
> Jamie> And templates remain dangerous bloat-generating territory.
>
> And templates, and operator overloading etc etc.
>
> C++ is much harder to maintain because there are a zillion obscure
> features people can use in there. It means that the people who
> maintains the kernel needs to understand these things as well thus we
> suddenly reduce the number of potential kernel programmers to a tiny
> fraction of what we had before.

maybe it's different for mixing it with pure C like
in this special case, but -

until now I thought (and experienced) exactly the opposite.
C++ is imho especially perfect to maintain bigger projects and
was designed for this. to make programmers life easier in bigger
projects and development teams. in a well designed C++ project you
are actually forced to do the right thing (e.g. use inherited
objects in the right way - and yes, use the overload feature
to simply add features to an inherited object works great
and does not confuse at all, if you are using it in the
right way...).
so do you really think C++ (and OOP in general) is a
retrogression compared to C ??

again this might be a more complex problem in the special case,
but I just couldn't resist to repond to this general statement above.
maybe it was a little bit off topic as well, so sorry...

frank

---
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cookie of the day:
Once, adv.:
        Enough.
            -- Ambrose Bierce, "The Devil's Dictionary"
 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Frank Butter <fbutter@ottomall.com.tw> sent on 06-Jul-99, at 16:39:41 OTTO-Chailease Mailorder Co., Ltd., Taipei

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