|
|
|
|
|
by kaashif
1037 days ago
|
|
> And since C++ is a superset of C that is certainly true there. C++ is not a superset of C. C99 has and C++ (at the time of writing) doesn't have: restricted pointers, designated initializers, variable length arrays, and probably more. These are language features that are actually used. This doesn't change any of your core points. |
|
It was such a terrible feature it was made optional in the C11 standard (you can be a conforming C11 compiler and not allow this feature) and will never, ever be implemented in a Microsoft compiler (while C is not a priority for MS, do note that they updated to C11 and C17).
You can hear their reasoning there :
https://devblogs.microsoft.com/cppblog/c11-and-c17-standard-...
The linux kernel used to make use of the feature and removed every instance of it from the code base :
https://www.phoronix.com/news/Linux-Kills-The-VLA
> Particularly over the past several cycles there has been code eliminating the kernel's usage of VLAs and that has continued so far for this Linux 4.20~5.0 cycle. There had been more than 200 spots in the kernel relying upon VLAs but now as of the latest Linux Git code it should be basically over.
While I do agree that it is wrong to consider C++ a superset of C, it is time to forget about C99's biggest mistake and treat it as if it didn't happen.