Professional Documents
Culture Documents
The programming language C++ will turn 38 years old in 2023, yet remains highly
popular, having recently been recognized as the fastest growing programming language
since the Covid-19 pandemic.
The age of the language primarily poses two major problems: it is saddled with technical
debt, and is regularly criticized for missing features and simply being unintuitive. It has
also had time to become so embedded that getting programmers to accept an alternative
en-masse is an uphill battle.
Enter Google, and Carbon, a programming language it first unveiled in July 2022 that it
hopes will wipe away technical debt by starting over and allowing developers to merge
their own features via GitHub. It also wants to offer a compelling reason for developers to
gradually switch to it by being interoperable with C++ code, rather than gunning for its
crown.
TechRadar Pro had the opportunity to speak with Phil Nash, Developer Advocate at
"clean code environment" software provider Sonar, the author of the C++ test framework,
about what Carbon aims to do and how it intends to do it.
There are several significant issues in C++ that Carbon addresses. These problems in C++
are the result of decades of technical debt in the language that, because of the priorities of
C++ evolution, cannot be addressed within C++ itself.
The language is notoriously hard to parse - even for tools - and often requires many extra
keywords to get the behavior you would like by default. Its original take on generics
evolved into a fully fledged meta-programming language, yet had been unable to fulfill
some of its early goals.
1/3
Carbon also aims to address the governance model: favoring a Benevolent Dictators
(emphasis on the plural) model with an open evolution process on modern tools - rather
than an international standard (ISO) that is optimized for representation by nations and
corporations.
Built into the evolution model is the expectation of breaking change - and a tool-based
approach to dealing with it.
The evolution process occurs in public using familiar tools, such as GitHub and Discourse
and is open to external contributors.
The closed nature of the process can lead to a disconnect between the committee and the
community - and lead to accusations of misplaced motives. However, on the flip side, that
same closed process model does provide a neutral ground for employees from competing
organizations collaborating towards a common goal.
What are the key differences between these other successors and
Carbon?
Cpp2 compiles down to C++. More specifically it compiles down to readable C++. This is
important because, in theory, it means that if you decide to abandon Cpp2 you can take
the generated C++ and just carry on as if it was always written that way.
2/3
It is also being designed in tandem with major proposals for equivalent features in C++. If
any of these are adopted the difference between the languages gets smaller.
For many Carbon may not be taken seriously while it is largely seen as under the control
of Google, so the future of the leadership team is a big factor, too. With other contenders,
like Cpp2, also emerging it has a good chance, but is by no means guaranteed.
3/3