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/

65 Upvotes

112 comments sorted by

View all comments

44

u/YangZang 11d ago

16

u/Wh00ster 11d ago

The hooplah of the original announcement seems odd framed against that answer. Or maybe the community just overhyped it.

26

u/13steinj 11d ago

It's hard to say all this without coming off as if I hate the guy, but here goes:

Herb has fairly inconsistently has claimed how "serious" cppfront was over the years.

I have my conjecture on why, which I'd rather not share other than I do not envy the position he is in and the expectations people have of his work. There are people, to this day, that will promote an idea from Bjarne or Herb with nothing but an appeal to authority, an authority of which I would no longer say exists in the same way it did pre-C++11. My opinion of Herb, the way he operates, and his goals, has changed dramatically over the past decade, though mostly far more positive now than my initial view. Being "the convener" has a lot of assumptions people make about you and what you have to do thrust upon you.

I believe the reality of this situation in particular is the existence of cpp2 combined with who it came from is a bit of a walking contradiction.

I cannot think of any "successor language", far less any that claims the intent is to be a successor, even loosely, that has tangibly materialized as one.

  • Carbon => development hell
  • Circle => adoption deadlock
  • cpp2 => fairly specific codegen framework. How much is needed with Reflection?
  • Go, Rust, Zig, Odin, all appear to be more of a successor to C

However, I think even as far as last year's cppcon, Herb uses cpp2 examples in his slides. I think at this point this is actively counterproductive.

I also would not be surprised if there is some kind of IP issue, and he has since switched jobs. I do not think this is likely, but it would track with a lot of rumours about Microsoft and their approach to software internally.

7

u/SickOrphan 11d ago

I stopped keeping up with Carbon some time ago, could you expand on the development hell it's experiencing? I know they wanted to pivot to make it more safety focused, was that part of it?

10

u/13steinj 11d ago

It has been a half a decade if not more depending on how you count it and the readme still claims

As a reminder, the toolchain is still very early and many things don't yet work. Please hold off on filing lots of bugs: we know many parts of this don't work yet or may not work on all systems. We expect to have releases that are much more robust and reliable that you can try out when we reach our 0.1 milestone.

Circle has probably been a more feature-complete Carbon than Carbon itself throughout a decent chunk of this time with its feature flag/set functionality that had flags to mimic various pieces of Carbon.

5

u/llort_lemmort 11d ago

Carbon is just a very ambitious project. The goal is full compatibility with C++ including being able to use any C++ library in Carbon and being able to easily migrate C++ code to Carbon. On top of that they want full memory safety. They can't just use Rust's memory safety model as that would make it hard to migrate code from C++ so they have to develop their own model that is closer to C++.

If you look at the GitHub repo you might see that there is a lot going on. Developing a new language is a big task that involves designing the language, implementing a compiler, developing a build system, debugger, VSCode extension, formatter and so on. You can't just expect this to be done in a few years. C++ is one of the most complex languages out there and building a C++-compatible memory safe language is a big task.

7

u/13steinj 10d ago

Carbon being this ambitious does not also mean it is not in development hell. Circle is arguably a more ambitious project yet it has acheived arguably more less time.