Re: C++ pushback

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 28 Apr 2006, Avi Kivity wrote:

> Sam Ravnborg wrote:
>> The original question was related to port existing C++ code to be used
>> as a kernel module.
>> Magically this always ends up in long discussions about how applicable
>> C++ is the the kernel as such which was not the original intent.
>>
>> So following the original intent it does not matter what subset is
>> sanely used, only what adaptions is needed to kernel proper to support
>> modules written in C++.
>>
>>
>
> Here at last is a sane response. If the kernel were enhanced/bastardized
> (pick one) to support C++ modules, we could evaluate how C++ actually
> does in terms of runtime and developer performance.
>
>> But I have seen no patches this time either, so required modifications
>> are yet to be identified.
>>
>
> Since such patches are sure to be rejected (apparently renaming 'struct
> class' would wreak havoc on the development process), I doubt that they
> will appear. Not to mention the attacks on the submitters that would follow.
>

I'm fairly sure that if header structure members were renamed (one
patch at a time), and were renamed sanely (like struct class should not
be renamed to struct TheyDidntKnowAnything)... and sanely also means
trying to have the same length like (struct klass)...and if every file
that included those headers were updated.... I think the patches would
not be rejected, especially if Linus said, "Let's get rid of the
C++ keywords."

It is well known that in a few years you won't be able to find a 'C'
compiler or C++ for that matter. Everything will be written in Z##
or whatever. The problem I see is that newcomers, who have only
learned one language, assume that they have some special enlightenment
and that 'C' is wrong. Simple changes that let these newcomers experiment,
perhaps finding the errors of their ways, as long as they are not
harmful, should not be discouraged.

Maybe it's fork time, but maybe not. There seem to be very few C++
keywords being used although, where they are used, affect many files.
If it was my ballgame, I'd let the C++ advocates submit patches to
remove those keywords. Then, after they get their first module
to load, they will learn the errors of their ways as they find
that there isn't enough RAM available to do any useful work. But,
at least the "bad" words will have been removed from the headers
by highly motivated programmers. The cost is zero.


Cheers,
Dick Johnson
Penguin : Linux version 2.6.16.4 on an i686 machine (5592.89 BogoMips).
New book: http://www.lymanschool.com
_


****************************************************************
The information transmitted in this message is confidential and may be privileged.  Any review, retransmission, dissemination, or other use of this information by persons or entities other than the intended recipient is prohibited.  If you are not the intended recipient, please notify Analogic Corporation immediately - by replying to this message or by sending an email to [email protected] - and destroy all copies of this information, including any attachments, without reading or disclosing them.

Thank you.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux