Experiment with a cleaner C++ syntax that compiles to standard C++20 your existing toolchain can already build
Prototype code using proposed C++ safety features like lifetime analysis before they reach the official standard
Study how future C++ language proposals might look in practice by running working examples
Mix old and new C++ syntax in the same file to incrementally adopt new patterns in existing codebases
Requires familiarity with C++ and manual build from source, not a production tool, explicitly described as a personal experiment.
Cppfront is a personal experiment by Herb Sutter, a well-known figure in the C++ standards community. It is a compiler that takes C++ written in a new experimental syntax he calls "Cpp2" and translates it into ordinary C++ code that any standard C++ compiler can then build. The project is not a replacement for C++ or a competing language. Instead, it is a way to prototype ideas about how C++ could be made simpler and safer in the future, with the goal of eventually proposing those ideas to the official C++ standards committee. The premise is that C++ has accumulated a lot of complexity over decades, and many common coding mistakes stem from that complexity. The new syntax tries to address this by providing a cleaner way to express the same things, while remaining fully compatible with existing C++ code, libraries, and compilers. You can mix the old and new syntax in the same file. The output of cppfront is standard C++20 code, so it works with tools and compilers that already exist without requiring any changes to them. The README includes a long list of C++ proposals and conference talks that grew out of this work, covering ideas like lifetime safety analysis, a comparison operator that was ultimately adopted into C++20, reflection and code generation features called metaclasses, and others. Some of those concepts are already implemented in cppfront, others are listed as future work. This is explicitly described as a personal experimental project rather than a production tool. The documentation, full design details, and a getting-started guide are available on the project's website linked from the README. There are also several recorded talks at C++ conferences (CppCon, ACCU) where Sutter explains the ideas behind this work. This repository is aimed at experienced C++ developers interested in language design and the future direction of C++. It is not an application end users would interact with directly, and it requires familiarity with C++ to use or evaluate.
← hsutter on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.