During the recently held ‘CPP North’ conference in Toronto, Chandler Carruth, a software engineer at Google, introduced developers to a new programming language called Carbon. According to Carruth, Carbon is an experimental successor to C++, which is ageing, and there is a growing demand in the developer community for the programming languages to evolve.
Can Carbon be a worthy successor?
At the event, Carruth announced Carbon as an experimental successor to the C++ programming language. Even though most of the developers working on Carbon are from Google, it is not a Google-exclusive project. Carruth revealed they would soon start this experimental work with the C++ community.
Carbon is open source, and the developers want it to be ‘an independent and community-driven project’ for it to be successful. So the project will be maintained on GitHub, with discussions on Discord.
“Carbon is for organisations and projects heavily dependent on C++; for example, projects that have a lot of C++ code or use many third-party C++ libraries,” the creators said in a Github repository.
The origin of Carbon also lies in the fact that it is difficult to improve C++. One of the primary reasons for this is that C++ has decades of technical debt accumulated in language design. Further, it also inherited the legacy of C.
Carbon does not inherit the legacies of either C or C++. Instead, the developers have ensured Carbon has a much more efficient evolution process. Also, it’s built on open-source principles, processes, and tools.
However, for Carbon to be a worthy successor to C++, there is a long way to go. First of all, C++ has been around for a very long time. Carbon, on the other hand, is still in the experimental stage and years away from actual use. Even when it comes to life, Carbon must be able to address the problems that C++ failed to.
One of the plus points of C++ is that it can directly manipulate the hardware it runs on. All programmers need to do is fine-tune their code even in limited hardware space availability. For Carbon to be a successor, it must also be able to do similar things, and maybe more.
Also, the use cases of C++ are multifold. Popular operating systems such as Windows and macOS use C++. It is also one of the widely-used programming languages in the gaming industry, with games such as World of Warcraft, and Counter-Strike having been developed using C++.
Popular database tools like MySQL and MongoDB were built using C++. It also plays a role in web browsers like Google Chrome, Mozilla Firefox, and Safari. TensorFlow, an open-source software library for machine learning, also relies on C++ as a back-end programming language. Further, C++ is also used to develop many financial tools and flight softwares.
Carbon in, Rust out!
Before Carruth introduced us to Carbon, another programming language called Rust was seen as the successor to C++. This was primarily because of its syntactic similarities to C++, as it provides increased speed and better memory safety. However, this is open to discussion since many developers found Rust too difficult to learn as it introduced a lot of novel concepts too.
Besides the steep learning curve, converting major projects’ current C++ codebases to Rust is challenging. Further, according to the developers of Carbon, the design of Rust itself acts as a significant barrier to adoption and migration from C++. On the other hand, Carbon aims to convert the C++ codebases in a much better way than Rust.
For a C++ developer, it won’t be difficult to learn Carbon. In fact, Carbon is said to have a gentle learning curve. While many felt using Rust was similar to learning a new programming language.
“It is built out of a consistent set of language constructs that should feel familiar and be easy to read and understand,” Carbon’s Github page states.
While speaking at the event, Carruth also explained that Rust, which Mozilla developed, doesn’t have the same ‘bi-directional interoperability’ as other tools. But, the creators of Carbon encourage developers to keep using Rust if it’s technically and economically viable for the project.
“We believe Rust is an excellent choice for writing software within the pure Rust ecosystem. Software written in Rust has properties that neither C++ nor Carbon has. Rust is also good for using APIs implemented in a different language in-process, when the cost of maintaining the FFI boundary is reasonable.”
How is the industry reacting?
“Carbon matches 100% of the performance of C++ and aims to provide a significantly better developer experience,” Kaggle master and senior data scientist Mark Tenenholtz tweeted.
This is mainly because Carbon reduces existing libraries’ tech debt and makes extending those libraries easier.
However, not everyone is convinced that Carbon would be a worthy successor to C++. While Carbon is new, C++ has been around for decades and has large community support.
“I don’t know if Carbon will be ditched in a year or if it’s going to revolutionise the way C codebases are maintained,” Tenenholtz added.
A few community members questioned the need to change trivialities like syntax and make people learn stuff all over again.
Carbon seems really Googley in the subset of C++ that it likes to interoperate with. e.g. C++ exceptions not fully supported, no coroutine support yet (ever?) Very tailored to Google's coding standards.
Had a quick look at Carbon, why can't any "C/C++ successor" use C-style syntax like a god damn normal language, it's a nonstarter for me. pic.twitter.com/yUTPMOTwzE
However, another section of developers are excited about Carbon and what it could bring to the developer’s community.
Google released Carbon, an experimental language as a successor to C++ !
Now I can’t wait for Junior Carbon developer job postings requiring 10 years of Carbon experience 😅
Conference, in-person (Bangalore)
Conference, in-person (Bangalore)
Machine Learning Developers Summit (MLDS) 2023
Conference, in-person (Bangalore)
Data Engineering Summit (DES) 2023
21st Apr, 2023
Stay Connected with a larger ecosystem of data science and ML Professionals
Discover special offers, top stories, upcoming events, and more.
The “ipyvizzu” is an animated graphing tool for notebooks
Microsoft has formulated a library named DoWhy to build efficient and robust causal models for critical domains.
PyTorch Lightning enables the usage of multiple GPUs to accelerate the training process. It uses various stratergies accordingly to accelerate training process.
Preprocessing prevents from overfitting
The program enables participants to gain an in-depth understanding of data science, artificial intelligence and machine learning techniques and tools widely used in the industry.
Indian agritech companies aim to provide innovative solutions and actionable advice.
Emerging data analyst profiles in government organisations at central and state levels.
HCL Technologies’ C Vijayakumar is the highest paid CEO among Indian software companies, with a whopping $16.52 million remuneration
Facebook’s parent company Meta posted its first-ever revenue decline after a stupendous run for years.
Data is the key element across all the three tenets of engineering brilliance, customer-centricity and talent strategy and engagement and will continue to help us deliver on our transformation agenda. Our data-driven culture fosters continuous performance improvement to create differentiated experiences and enable growth.
Stay up to date with our latest news, receive exclusive deals, and more.
© Analytics India Magazine Pvt Ltd 2022