News for hackers. Stuff that matters.
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?
Re:Ask HN: A retrofitted C dialect? by Macha on Wednesday February 26, 2025 @09:16AM (#43183761)
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)

Re:Ask HN: A retrofitted C dialect? by tayo42 on Wednesday February 26, 2025 @10:50AM (#43184788)
Interesting I Wonder why I thought that then