Well, it's quite simple, really...
Posted Jan 18, 2011 12:08 UTC (Tue) by
dwmw2 (subscriber, #2063)
In reply to:
Well, it's quite simple, really... by khim
Parent article:
Sobotka: Why GIMP is inadequate
"Well, this is strawman argument: of course you can just ignore all C++ extensions and then produce the same code in C++ as in C."
Can I? In the kernel we make heavy use of C99 structure initialisation. Where structures can so often change and gain new members, it's very important to have
named initialisers. But this code will fail if compiled as C++:
struct foo {
int a;
int oh_we_introduced_this_optional_thing_later;
int b;
};
struct foo f = {
.a = 1,
.b = 2,
};
Losing that facility would introduce a
lot of errors into the kernel, at a single fell stroke.
(
Log in to post comments)