Paul Krill
Editor at Large

Cppfront project aims to modernize C++

news
Sep 21, 20222 mins

Cppfront is an experimental compiler for an alternate C++ syntax that would make the venerable programming language ‘10x simpler, safer, and more toolable.’

Evolution of Lighting 166160844
Credit: Thinkstock

The highly vaunted C++ language would become simpler and safer under a proposal dubbed Cppfront, an experimental C++ front end being floated by prominent C++ developer Herb Sutter.

Intended as a major C++ evolution, Cppfront is an experimental “syntax 1 to syntax 2” compiler designed to explore whether C++ can evolve to become “10x simpler, safer, and more toolable,” said Sutter in a GitHub repo on the project. Sutter is chair of the ISO C++ committee, the designer of various C++ features, and a Microsoft software architect.

An alternative C++ syntax would provide “a bubble of new code that does not exist today,” allowing C++ language designers to make arbitrary improvements such as changing defaults, removing unsafe parts, and making the language context-free and order-independent. Type and memory safety would be offered by default. The “second syntax” would also make it easy to write a parser and refactoring and other tools.  The syntax also would double down on modern C++, making C++ 20  modules and C++ 23 import std the default.

The Cppfront compiler is still a work in progress. The project itself actually has been in development for seven years but had its “coming out party” of sorts at last week’s CppCon conference in Aurora, CO. Cppfront builds with major C++ 20 compilers including MSVC, GCC, and Clang. Instructions can be found on GitHub.

Sutter’s project follows the recent revelation of Carbon, a planned experimental successor to C++. Created by Google, Carbon is an attempt to offer seamless, bidirectional interoperability with C++ while overcoming hurdles to evolving the language.

Paul Krill

Paul Krill is editor at large at InfoWorld. Paul has been covering computer technology as a news and feature reporter for more than 35 years, including 30 years at InfoWorld. He has specialized in coverage of software development tools and technologies since the 1990s, and he continues to lead InfoWorld’s news coverage of software development platforms including Java and .NET and programming languages including JavaScript, TypeScript, PHP, Python, Ruby, Rust, and Go. Long trusted as a reporter who prioritizes accuracy, integrity, and the best interests of readers, Paul is sought out by technology companies and industry organizations who want to reach InfoWorld’s audience of software developers and other information technology professionals. Paul has won a “Best Technology News Coverage” award from IDG.

More from this author