Carbon
An experimental successor to C++ designed at Google for performance, interoperability, and modern language design.
Created by Chandler Carruth (Google), Richard Smith (Google), and Kate Gregory
Carbon is an experimental programming language designed at Google as a potential successor to C++. Announced publicly in July 2022 by Chandler Carruth at the CppNorth conference, Carbon aims to provide a modern alternative for the massive ecosystem of C++ developers and codebases while maintaining full interoperability.
History & Origins
Carbon was born from a pragmatic observation: C++ is the dominant language for performance-critical software, but it struggles to evolve due to decades of accumulated technical debt and the constraints of its standardization process. Rather than trying to incrementally fix C++, the Carbon team chose to design a new language from scratch—one that could interoperate seamlessly with existing C++ code while offering modern language features.
Development began internally at Google around 2020, with the GitHub repository created on April 27, 2020. The project remained private until Chandler Carruth’s keynote at CppNorth in Toronto on July 19, 2022, which brought immediate widespread attention from the systems programming community.
The Successor Language Pattern
Carbon explicitly draws on the pattern of other successful “successor languages”:
- TypeScript succeeded JavaScript by adding types while maintaining compatibility
- Kotlin succeeded Java by modernizing syntax while targeting the same VM
- Swift succeeded Objective-C for Apple’s ecosystem
Carbon aims to fill the same role for C++—a modern language that can be adopted incrementally within existing C++ projects.
Design Goals
Carbon’s core design goals reflect the challenges of replacing C++:
- Performance matching C++: Using LLVM for compilation, with low-level access to bits and addresses
- Seamless C++ interoperability: Bidirectional, so a library anywhere in a C++ stack can adopt Carbon without porting everything
- A gentle learning curve: Familiar syntax for C++ developers
- Scalable migration: Including source-to-source translation tools for idiomatic C++ code
Key Features
Modern Generics
Unlike C++ templates (which use duck typing and are checked only at instantiation), Carbon provides checked generics where types are verified at definition time:
fn Min[T:! Ordered](x: T, y: T) -> T {
return if x <= y then x else y;
}
Carbon also supports C++-style templates for interop, giving developers a migration path from template-heavy codebases.
Modern Syntax
Carbon uses a consistent, modern syntax inspired by recent language design:
fnfor function declarationsvarfor mutable variables,letfor immutable bindings- Expression-based constructs and pattern matching
- No header files—modules and packages instead
Memory Safety Path
The Carbon team is actively designing a path toward memory safety, inspired by Rust’s ownership model but adapted for C++ interoperability. This is one of the project’s most ambitious goals and contributed to pushing the 0.1 timeline.
Current Status
Carbon is experimental and not ready for production use. The project is transparent about this:
- No stable release exists. The toolchain is pre-0.1 with nightly releases only
- Nightly toolchain releases are available for Linux (Ubuntu/Debian)
- Version 0.1 (minimum viable product) is targeted for late 2026, though the project describes this as “a very ambitious goal”
- Version 1.0 (production-ready) is projected for after 2028
- The language syntax and features are actively changing
The recommended way to try Carbon is through the browser at carbon.compiler-explorer.com. For local development, nightly toolchain tarballs can be downloaded from the GitHub releases page.
Carbon vs. Other Languages
Compared to C++: Modern syntax, checked generics, designed for interop rather than replacement Compared to Rust: Prioritizes C++ migration path over maximum safety guarantees Compared to Zig: Different goals—Carbon focuses on C++ successor, Zig on C successor Compared to Go: Carbon targets systems programming with no GC, while Go targets networked services
Carbon represents a bold experiment: can a new language succeed by being explicitly designed as a C++ successor with full interoperability? The answer depends on whether the project can deliver on its ambitious technical goals while building a community around an experimental language.
Timeline
Notable Uses & Legacy
Google (Internal Exploration)
Carbon was designed at Google to address the challenges of evolving massive C++ codebases. It remains in the experimental research phase.
Advent of Code 2024
The Carbon team used the language to solve approximately 15 of 25 Advent of Code 2024 challenges, demonstrating the toolchain's growing capabilities.
Language Influence
Influenced By
Running Today
Run examples using the official Docker image:
docker pull ubuntu:22.04Example usage:
docker run --rm -v $(pwd):/app -w /app ubuntu:22.04 bash -c 'apt-get update -qq && apt-get install -y -qq wget libgcc-11-dev > /dev/null 2>&1 && VERSION=0.0.0-0.nightly.2026.02.07 && wget -q https://github.com/carbon-language/carbon-lang/releases/download/v${VERSION}/carbon_toolchain-${VERSION}.tar.gz && tar -xzf carbon_toolchain-${VERSION}.tar.gz && ./carbon_toolchain-${VERSION}/bin/carbon compile --output=hello.o hello.carbon && ./carbon_toolchain-${VERSION}/bin/carbon link --output=hello hello.o && ./hello'