Hacker News new | past | comments | ask | show | jobs | submit login

Isn't all C also valid C++? So this would apply?



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)


Interesting I Wonder why I thought that then




Consider applying for YC's Summer 2025 batch! Applications are open till May 13

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: