Active Hackathon
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.
Typescript was developed by Microsoft as a successor to JavaScript. Similarly, Kotlin was created to shore up weaknesses in Java. Now, the question is can Carbon prove to be a successor to C++?
Code comparison
(Source: Github)
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.
Conference, Virtual
Genpact Analytics Career Day
3rd Sep
Conference, in-person (Bangalore)
Cypher 2022
21-23rd Sep
Conference, in-person (Bangalore)
Machine Learning Developers Summit (MLDS) 2023
19-20th Jan, 2023
Conference, in-person (Bangalore)
Data Engineering Summit (DES) 2023
21st Apr, 2023
Conference, in-person (Bangalore)
MachineCon 2023
23rd Jun, 2023
Stay Connected with a larger ecosystem of data science and ML Professionals
Discover special offers, top stories, upcoming events, and more.
Experts say that if governments seek access, having so much information about people in the hands of a single firm risks becoming a single point of failure for democracy
Various big tech companies announced new innovations, software developments and hardwares along with conferences and workshops for AI and Metaverse.
“There are probably a bunch of people at the company who should not be working here,” says Meta chief Mark Zuckerberg.
Marvel excluded!
The Metaverse without human-like representations or AI inside it will be a very dull and sad place
It will provide OpenAI API developers free access to GPT-based classifiers that can detect harmful content, OpenAI states in a blog post.
A whopping 348 apps are banned in India to uphold ‘the security of the state and public order’ but are still available as cracked versions on the web
Protein structures innately shift and transform, sometimes very drastically and sometimes in subtle ways when small-molecule ligands show up.
According to Sigmoid, a data engineering and AI solutions company, adoption of cloud data warehouses is growing at a CAGR of 15%.
The company has built a repository of more than two crore data points, including navigation systems, telematics, and 3D data visualisations
Stay up to date with our latest news, receive exclusive deals, and more.
© Analytics India Magazine Pvt Ltd 2022
Terms of use
Privacy Policy
Copyright