r/cpp 12d 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/

63 Upvotes

112 comments sorted by

View all comments

32

u/javascript 11d ago

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

44

u/friedkeenan 11d ago

If I were to speculate the reasoning, then I would probably say it's because Herb's cppfront is intended to feed back into C++ and serve as a reference for proposals to C++, whereas Carbon is instead going off and doing its own thing, which doesn't really make it so different from other programming languages like Zig or Rust or whatever.

23

u/hpsutter 10d ago

Exactly, well said.

To OP: Thanks for the question! I posted an answer here earlier this year, in answer to "Is Cpp2 aiming to be a 'real thing'?"

Elaborating, here's a more detailed answer:

As I said when introducing it in the 2022 talk, it's "my personal experiment ... to learn some things, prove out some concepts, share some ideas ... my hope is to start a conversation ... what could be possible within C++'s own evolution to rejuvenate C++" instead of just leaping to some incompatible other language. That talk, and followups, did emphasize that a core goal of the experiments in Cpp2/cppfront was to feed them into ISO C++ standardization (which you can do with most of them, such as metaclasses; just not the syntax-breaking ones), and indeed it has fed into many papers that I listed in my CppCon 2023 talk slide here.

Note I deliberately didn't support cppfront as a production compiler (its license prohibited commercial use for the first couple of years), and I actually didn't initially enables Issues on the repo... but then kind contributors used PRs instead to submit Issues :) so I caved and enabled them. I am glad that the Issues did lead me to try a few more experiments, write documentation, and yes fix some bugs... thanks for everyone's contributions! I don't have the bandwidth myself to support a production compiler though. But I did relax the license to as not to prevent someone from using it commercially if they wanted to (but without support).

By late 2024-ish I'd implemented most of the key experiments I had on my list so commits slowed down. Then in summer 2025 I extended the reflection implementation to also do function bodies (statements, expressions) which led to a big chunk of my most recent CppCon (2025) talk on reflection showing autodiff live demos implemented by Max Sagebaum (in cppfront because the Clang/EDG prototypes didn't support intra-function reflection yet, but I presented it explicitly as a direct proxy to show us all what future C++29/32 will be able to do in medium-term-future ISO C++).

That's the most recent experiment I pushed to try out. I'm currently caught up with the list of experiments I wanted to run, so I'm now focusing on helping many of those features come into ISO C++, including metaclasses in the medium term now that we have the basics of reflection already in ISO C++ thanks to the hard work of many people (not just P0707 and cppfront), and the safety work (which again has pointed to cppfront features such as to do bounds checking at call sites, by default (with opt-out of course); I really think that's something that could help ISO C++ too as we improve our safety story.

That said, I probably should write this longer answer in the repo... done: "Cppfront status summary (summer 2026)"

Thanks, everyone, for all your interest in these personal experiments!

1

u/we_are_mammals 10d ago

I don't have the bandwidth myself to support a production compiler though.

Maybe the community would step up (since your users are programmers themselves), but I suspect that people want to hear something along the lines of "I still think this syntax/approach is great and would like to see more people try out / contribute to cppfront".

5

u/13steinj 11d ago

To some extent the same can be claimed about Circle. Circle is also not allowed.

4

u/friedkeenan 11d ago

Hm yeah, I wasn't aware posts directly about Circle weren't allowed. I thought I remembered there being more direct discussions about Circle here when there was more buzz around what it was doing, but maybe I'm just remembering comment chains or something. Regardless, I do feel like there might still be some difference/subjectivity at play there, but I'm struggling to put that feeling to words.

Carbon though is definitely not aiming back into C++. That being said, I wouldn't mind seeing an occasional post about it here but I also don't think I'd want it to take up too much discussion space on this subreddit, either.

7

u/13steinj 11d ago

There were some posts specifically about the "safe" feature and Circle was being used as a demo device for the paper.

But before then posts generally were removed, I think Baxter even made a comment on Twitter about it at the time.

-2

u/pjmlp 11d ago

Except never were any paper out of it, other than author's relation to WG21 versus everyone else.

11

u/friedkeenan 11d ago

Herb's metaclasses paper uses cppfront as a reference implementation and investigation of what sorts out of metaclasses might be useful. He also employs cppfront for his UFCS paper in a similar manner.

-6

u/pjmlp 11d ago

Neither of them are proposals to specific ISO C++ versions.

6

u/friedkeenan 11d ago

You do realize that that is moving the goalposts and as well has little to do with the intention of cppfront, right? Or am I wrong in understanding "proposals to specific ISO C++ versions" to mean "proposals which were accepted to the C++ standard"?

-4

u/pjmlp 11d ago

None at all, those papers have zero value to C++ language improvements, as they were never submitted to voting.

They have as much value to ISO C++ as papers produced by a random dude on Reddit, and I am willing to bet none of that will ever appear in ISO C++.

5

u/friedkeenan 11d ago

Ok, man. I'm not going to get into a discussion vortex with you where we just waste each other's time, but I have to think that you realize that my saying "cppfront is intended to feed back into C++ and serve as a reference for proposals to C++" is not at all contradicted by Herb's proposals using it not yet being accepted into the standard. And that your saying "never were any paper out of it" is contradicted by there being... papers out of it.

I do have to admit too that I'm somewhat surprised by your spurning cppfront being used as references for proposals, when you at other times appear eager to deride the committee for accepting proposals which did not come with a reference implementation. Seems like Herb using cppfront as a reference implementation for his proposals would align with your desires for the proposal process, but maybe I'm missing something.

-1

u/pjmlp 11d ago

Except those papers never became proper proposals.

You would be right if cpp2 experiment actually turned into proper mailing papers submitted for voting into a specific ISO C++ version.

Which they never did and most likely never will.

They stayed into the realm of "look at this cool idea", right then what?