← Impulso Blog

Everything you need to know about Carbon, Google’s new programming language

Carbon is a new language created by Google engineers that could affect developers’ day-to-day work. Read on to find out how!

Google logo in illuminated, multicolored letters.

Editorial translation by Impulso.

In mid-2022, a new programming language called Carbon was unveiled! It was created by Google software engineers, who introduced it at a conference in Canada.

Carbon is still in the experimental phase, but it’s already seen as a possible successor to C++. The language seems to have enormous potential, both because of its specifications and because of how much it’s expected to grow over the long term.

With that in mind, I’ve pulled together some key information about Carbon so you’ll know everything you need to about this new programming language. Let’s take a look:

Does C++ need to be replaced?

Created in 1985, C++ was designed to replace C, which dates back to 1972. But as we know, C never went away entirely. Now, nearly 40 years later, a lot has changed in the world of programming. Carbon aims to do everything C++ does while offering a more agile, modern approach.

As well as C++ works, it has limitations: memory access errors, challenges in maintaining standards across older versions, and difficulty implementing newer software features. Still, it’s an incredible tool that isn’t going anywhere for a long time. The idea, then, is to use Carbon alongside C++ and take advantage of everything C++ already offers.

Using the languages together

As mentioned, Carbon is a clean implementation intended to complement C++, not replace it. That’s because C++ has become a specialized language used mostly by more experienced developers. Writing high-quality C++ code takes a lot of experience and skill.

That means this new tool will make it easier for less experienced developers to make valuable contributions to an existing project. For companies, Carbon also means spending less time training people to write quality code.

The main draw for these companies is that they’ll be able to reuse the C++ codebases they’ve invested in over the years. Carbon builds on that existing code.

What sets this language apart?

The basic idea is to create an open language grounded in modern software development practices. Google’s new language will let developers create APIs and will offer features for safe memory access, simpler composition rules, and fast compilation. A few other features are also worth highlighting:

  • Values are known at initialization. C++ allows unexpected values, which can cause strange behavior when your code runs;
  • There are no constructors, so you won’t risk accidentally breaking your code by calling a virtual function from a constructor;
  • You can’t accidentally override a virtual method;
  • Template programming is much easier thanks to interfaces.

The future of Carbon

It’s hard to say whether this project will take off. For now, all we can assess is the proposal itself, which so far seems quite reasonable and feasible. The idea of using Carbon alongside C++ and making the most of C++’s strengths can only benefit developers.

Another interesting point is that although Carbon was conceived by a private company, the plans are different once the language is up and running. Google wants an open-source developer community to maintain it, without relying on a private organization. For now, though, the entire project is still in its early stages.

While we developers wait to get our hands on Carbon, you can sharpen your skills in other languages. Check out 5 fun ways to learn JavaScript. And come join our developer community on Discord, where you can ask questions, share insights, and make connections. Don’t forget to keep up with Impulso on social media and right here on our blog!

Related articles