Hacker News new | ask | show | jobs
by mikexstudios 477 days ago
Kind of along these lines but for C++: https://docs.carbon-lang.dev/
2 comments

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
Thanks for the mention! I heard about Carbon years ago but I'm happy this time I could dig it further for insights now.

It's pretty fun to think about "Carbon to C++ is Kotlin to Java". One very important takeaway from all the discussions here is that, I cannot ship a language right to the target (small) community, as it's impossible to control how people decide to use this language. Which means, I have to focus much on how to improve the experience of application writing. Carbon would definitely be one of the inspiration.

Oh yeah, and I don't need to handle seemless integration with templates, I'm lucky.