> (everything here also applies to c2y's newly introduced _Countof)
Stop the press, they're adding what? So I don't have to keep adding #define count_of(arr) (sizeof(arr) / sizeof(*arr)) to every codebase and living with its failure modes?
I'm really loving C's character arc at the moment, where they keep going back to fix old problems instead of piling everything and the kitchen sink into the language.
Yeah, despite puritanical hand-wringing over C23, I do like both the discipline and the selectivity with WG14 has shows (and I say this as a card-carrying C++ hater).
I do wish they will start looking into proper arrays since there is already a syntax for this can can be augmented semantically:
> (everything here also applies to c2y's newly introduced _Countof)
Stop the press, they're adding what? So I don't have to keep adding #define count_of(arr) (sizeof(arr) / sizeof(*arr)) to every codebase and living with its failure modes?
I'm really loving C's character arc at the moment, where they keep going back to fix old problems instead of piling everything and the kitchen sink into the language.
Yeah, despite puritanical hand-wringing over C23, I do like both the discipline and the selectivity with WG14 has shows (and I say this as a card-carrying C++ hater).
I do wish they will start looking into proper arrays since there is already a syntax for this can can be augmented semantically:
I feel like what you struggle with is expression parsing, not sizeof itself?
Wait, they added a new operator and didn't fix that parsing stupidity by always requiring parentheses?