Particularly when using structs this removes a lot of ambiguity if you ignore the indirection to find out the underlying type of the enum (or encode it in the name hungarian style).
enum D : uint8_t {
A = 0,
B = 1,
C = 2
}
typedef struct {
D f;
} __attribute__((packed)) E;
assert(sizeof(E)==1);
etc. could make grokking protocol declarations with enums less onerous and requiring one less level of indirection.
As a sneering C++ programmer, why are you even reading / commenting on a new C standard? This is basically a "if you don't have anything nice to say, don't say it" situation.
Honestly, because there's very little c++ content here on HN and a relatively large amount of C content. Most of the C content is full of people saying "we don't need X from C++" but the reality is most of these things have significant uses
Neither of those statements really matches my experience with HN (high C to C++ content ratio, lots of comments rejecting advances first added to C++). I totally agree some of these things are very useful and I'm glad to see them formalized in C (even years later than C++).
They're too busy looking for their vowels to reply here.
Joking aside, I've a healthy amount of respect for rust, and I hope that many of the ideas make their way into other language. The terseness, heavy use of macros, _insane_ compile times (and that's coming from someone who writes templates in c++), general assumption that you're on Linux from third party crates, and IDE support combine for something that just isn't usable for me just yet. Maybe in a few years!
Particularly when using structs this removes a lot of ambiguity if you ignore the indirection to find out the underlying type of the enum (or encode it in the name hungarian style).
etc. could make grokking protocol declarations with enums less onerous and requiring one less level of indirection.