Fundamentals 8 min read

Can Google’s Carbon Become the Next Evolution After C++?

The article examines Google’s Carbon language as a modern successor to C++, discussing its goals, design principles, interoperability with existing C++ code, and how it compares to other successor languages like Rust, Kotlin, and TypeScript.

21CTO
21CTO
21CTO
Can Google’s Carbon Become the Next Evolution After C++?

New promising programming languages keep emerging, with Rust and Go being successful examples.

Despite the excitement, the most commonly used languages for project development remain Java, C, C++, and Python.

However, these popular legacy languages have several drawbacks.

In July 2022 at CppNorth, Google senior software engineer Chandler Carruth announced the formal development of Carbon, a language intended as a successor to C++. Google states that C++ is the main language for performance‑critical software, but after decades of accumulated technical debt and a challenging evolution, it is difficult to improve.

Google also notes that C++ inherited problems from C, such as text preprocessing and include mechanisms.

The preprocessor and include system were crucial for C++’s early success, allowing immediate, high‑quality access to the large C ecosystem, but over time they generated technical debt—from integer‑promotion rules to a complex syntax that is hard to parse.

Carruth explained that taking on this technical debt was a good decision at the time because it enabled the C++ ecosystem to bootstrap, which was essential for its success.

He added that C++’s commitment to backward compatibility adds further debt and makes fixing existing debt difficult or impossible.

According to C++ programmer, writer, and blogger Bartlomiej Filipek, C++ has existed for nearly 50 years (including compatibility with C), leading to a lot of “waste,” especially because of the desire for backward compatibility.

Rust is a successor to C++, not a replacement.

Google believes the best way to avoid inheriting C or C++ problems is to create a new language with modern foundations, such as a modern generic system, modular code organization, and a consistent, simple syntax.

Google also follows the successor‑language approach: Carbon should build on the existing ecosystem, provide bidirectional interoperability, optimize the learning curve and adoption path, and offer tool‑assisted migration support.

Other successor languages, such as Kotlin (the successor to Java) and TypeScript (the successor to JavaScript), have been very successful in filling gaps in their respective ecosystems.

Phil Nash of SonarSource explains that Rust competes with C++ in performance but is an alternative, not a successor, meaning Rust is an independent language.

Carruth says Rust is great if it solves your problem, but migrating a large C++ ecosystem with deep dependencies to Rust would be extremely difficult.

Carbon aims for seamless interoperation with C++ code. According to Filipek, this helps C++ developers use Carbon immediately without starting from scratch.

You can have a large C++ codebase maintained for 20–30 years and start introducing Carbon alongside it; the two can call each other seamlessly, so you don’t have to move everything to a new ecosystem.

The GitHub project lists requirements for a C++ successor language: match C++ performance, provide bidirectional interop, have a gentle learning curve, offer comparable expressiveness, and support scalable migration.

Because Carbon is developed as a successor language, its success does not imply the disappearance of C++; instead, it could lead to better, safer, easier‑to‑develop systems that reuse existing C++ parts, with both languages learning from each other.

Carbon was announced in the summer and is still in an early stage; it is listed as “experimental” on GitHub and currently has no ready compiler or toolchain.

Google has defined core aspects of the project: an open‑source project structure, governance model, evolution process; design of key language features such as generics, class types, inheritance, operator overloading, lexical and syntactic structure, code organization, and modular structure; and a prototype interpreter demo.

Some view this as Google pushing its own agenda, but it is a reasonable approach.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

RustCProgramming Languagelanguage designCarbonsuccessor language
21CTO
Written by

21CTO

21CTO (21CTO.com) offers developers community, training, and services, making it your go‑to learning and service platform.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.