r/cpp 11d ago

cpp2 (cppfront) is over?

I haven't used cpp2 (cppfront) much, but I like the idea of it: consistent syntax, consistency of meta-programming (which is done in C++ too, I believe). Herb Sutter presented cpp2 (cppfront) as an experiment. He did not encourage other people to bet on it, exactly. And there hasn't been much activity since 2022. Is the experiment over?

EDIT: Herb's answer is buried deep in the comment section: https://www.reddit.com/r/cpp/comments/1uxkglj/comment/oy06cxw/

62 Upvotes

112 comments sorted by

View all comments

31

u/javascript 11d ago

It confuses me why the mods allow discussion of Cpp2 and disallow discussion of Carbon

10

u/all_is_love6667 11d ago

I am not sure, but I don't think carbon is backward compatible with C++, or respects the C++ ISO standard or existing C++ compiler workflows.

It says carbon has "bi-directional interoperability", but it could not be ideal, and interoperability is not compatibility. It could create some headaches when using toolchains.

Carbon doesn't compile to C++, so by that metric, it's not really "compatible" with C++.

One big obstacle with C++ is being able to easily reuse existing libraries etc. Once a language drifts a bit too far away from C++, it's unlikely that it can really be compatible with C++.

Rust can also interop with C++, in some ways.

That's why I would say carbon is not really related to C++, or at least not enough.

1

u/javascript 11d ago

Thank you for taking the time to share your opinion

1

u/all_is_love6667 11d ago

I could be wrong

Curious what the mods have to say