7 ms·
Flexible array members, designated initializers, compound literals, anonymous structs and unions, and many of the library features are pretty great. They more
by gdwatson 9y ago
Flexible array members, designated initializers, compound literals, anonymous structs and unions, and many of the library features are pretty great. They more than pull their weight.
I am glad the C11 committee put more weight on implementibility for C++ compilers than C99 did. Variable-length arrays in particular feel like the C99 committee decided to poke the C++ committee in the eye with a stick. (Given how the C++ world treated C at the time, though, I understand the temptation.) That said, if being compilable as C++ were a hard requirement for C features the world would be a poorer place.
- pjmlp 9y agoThankfully all the silly ideas in C99 regarding security weren't adopted by C++ and became optional in C11. Meaning VLAs that can blow the stack and memory related functions that still track pointer and size in disjoint variables.