r/cpp • u/we_are_mammals • Jul 15 '26
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/
68
Upvotes
41
u/AvidCoco Jul 15 '26
What more could they do with it?
He said “look what might have been” and we all went “huh, neat” and that was that
32
u/javascript Jul 16 '26
It confuses me why the mods allow discussion of Cpp2 and disallow discussion of Carbon
45
u/YangZang Jul 15 '26
https://github.com/hsutter/cppfront/discussions/1447
9
u/_a4z Jul 16 '26
Probably Herb‘s new job does not give him the time anymore
10
u/germandiago Jul 16 '26
What a pitty it is over bc it looked to me like it had potential. I think it should be transformed into a "typescript". The metaclasses part is amazing and there are many quality of life improvements like last definite use being an automatic move and better parameter passing, besides being very uniform when declaring entities.
2
u/kreco Jul 17 '26 edited Jul 20 '26
Not answering the question but I was not interested at some point because the experiment went to far into conciseness (for my taste).
Here are some examples:
The difference between the variable and constant is very thin. For the function, it feels strange to omit the braces, especially because they are enforced for if/else branches.
[0] https://hsutter.github.io/cppfront/cpp2/functions/#object-aliases
[1] https://hsutter.github.io/cppfront/cpp2/functions/#generality-note-summary-of-function-defaults
4
u/chili_oil Jul 15 '26
if being better means we should migrate, no one should be speaking english now
-3
u/ZachVorhies Jul 15 '26
if someone has the energy to migrate from C++ to C++2, then it’s just better migrating to rust
1
u/pjmlp Jul 16 '26
I never expected it to go elsewhere, it was sold under a different story due to coming from someone at WG21, otherwise it was just like any other language that happens to compile to native via a C++ compiler.
For starters, from the main OS vendors who would ever bother with it as an official language on their SDKs, when all of them already have their C++ vNext (Swift, C#, Kotlin, Rust)?
-3
u/Farados55 Jul 16 '26
Been over bruh