Re: Compiling C++ modules

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

 



On Maw, 2006-04-25 at 00:03 +0300, Avi Kivity wrote:
> Alan Cox wrote:
> I think it's easy to show that the equivalent C++ code would be shorter, 
> faster, and safer.

I've removed the poor guy from Iomega from the followups, perhaps others
could do likewise

Mathematically the answer is "no you couldn't". You might be able to
argue that a fortran implementation would be faster but not a C++ one.

And for strings C++ strings are suprisingly inefficient and need a lot
of memory allocations, which can fail and are not handled well without C
++ exceptions and other joyous language features you don't want in a
kernel. C with 'safe' string handling is similar - look at glib.

We have to make tradeoffs and the kernel tradeoffs have been to keep C
type fast string handling but to provide helpers in the hope people will
actually use them to avoid making mistakes.

-
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