Google Carbon and C++

Who, What, Where, and When

At the CppNorth conference on July 22, 2022, Google's Chandler Carruth announced that the programming language Carbon is being developed as an experimental successor to C++.

Why

The goal for Carbon is to maintain interoperability with C++ and improve some of the language's shortcomings. One primary motivation was to bring new features to C++ without carrying over the technical debt.

Carbon aims to be similar to how TypeScript is to JavaScript and Kotlin is to Java. For developers, migrating to Carbon doesn't require ground-up refactoring of codebases, and Carbon can be used along with existing C++ code.

While still in an experimental state, Carbon offers the following features which are lacking in C++:

  1. Introduce keywords
  2. Function input parameters are read-only values
  3. Pointer provides indirect access and variants
  4. Use expressions to name types
  5. Package as the root namespace
  6. API import by package name
  7. Method declaration with explicit object arguments
  8. Single inheritance, the default use of the final class
  9. Type-checks for generic definitions
  10. Strong, checked interfaces
  11. Track uninitialized states for memory safety

Future

Google doesn't want to own Carbon and be the central authority. Instead, they want to reduce centralized control and transfer ownership of the project to a nonprofit software foundation that will provide governance while development occurs via open-source contributions.

According to the Carbon roadmap, Google will make the experiment public by releasing a core working version (0.1) by the end of 2022. They plan to follow this with a 0.2 version in 2023 and a full 1.0 release in 2024–2025.

Further reading

GitHub - carbon-language/carbon-lang: Carbon Language’s main repository: documents, design, implementation, and related tools. (NOTE: Carbon Language is experimental; see README)
Carbon Language's main repository: documents, design, implementation, and related tools. (NOTE: Carbon Language is experimental; see README) - GitHub - carbon-language/carbon-lang: Carbon Langu...