E.g. why does this work:
struct bla_t bla = { .x=1, .y=2, .z=3 };
But when I want to assign to an existing variable a "type hint" is needed: bla = (struct bla_t) { .x=1, .y=2, .z=3 };
Why the (struct bla_t)? The compiler knows the type of "bla" after all.Also this would be nice to create a zero-initialized struct value:
const struct bla_t bla = {};
...this would basically be a C99 designated initialization without any initializers (it works as a language extension in gcc and clang, but is an error in MSVC).Another thing - that probably has no resolution - is the struct-tag thingie. Even after all those years I'm not decided if it's worth typedefing structs to remove the struct tag. Like
typedef struct _FooBuffer FooBuffer;
struct _FooBuffer {
...
};
// now we can declare FooBuffer variables without struct tag:
FooBuffer foo;
// had we just declared struct FooBuffer { ... } (without
the typedef), then we would have to do
struct FooBuffer foo;
As almost everybody, for a new language I would not want to have any struct tags.
Even though the argument from the Linux Kernel code style guide makes some sense to me
("don't typedef struct tags away because we want to see it's a struct"). Each struct keyword moves the following code 7 columns to the right, which is annoying in lines where there are 3 or more of them.So any changes to C at this point will not break your ability to use whichever prior C standard you happen to be interested in.
Blowing up language is not nice even for me as a businessman - now I have to place special care about who's coding what and how, something I didn't need to do up until now (in case of C).
This part is fair, but I've never worked (professionally) in a language that had a BDFL who controlled its extension in a deliberate fashion. It's always been design-by-committee languages. As a consequence, since I began, we've always had coding standards that limited what portions we could use for which projects (usually with options to try out novel parts of the language/standard library with extra reviews). And this is even true with C, though the restrictions weren't as severe (working in embedded, typically mandating no/limited use of malloc/free and no recursion, direct or indirect).
The backtrack from "we don't need C anymore" is most likely driven by, WSL, Azure Sphere OS, Azure RTOS, and above all probably some vocal customers with enough power to make it matter.
Even the Windows kernel team dropped the COM based userspace drivers framework, replacing it for a C based one.
In any case, everything from C99 that became optional in C11 isn't planned to ever be supported.