Re:Ask HN: A retrofitted C dialect?
by tayo42 on Wednesday February 26, 2025 @01:43AM
(#43181318)
Isn't all C also valid C++? So this would apply?
[ Parent
| on HN ]
No: https://en.wikipedia.org/wiki/Compatibility_of_C_and_C%2B%2B
There's the small stuff like "class" is a keyword in C++ so not a valid variable name.
There's the fact that C has continued to evolve so there are new C features that haven't made it into C++ yet (VLAs).
There's stuff that has been implemented differently in both in mostly compatible but sometimes observably different ways (e.g. the types of character and boolean literals)