News Blog

Stay tuned as the company news with our expert team innovations in latest technology.

Carbon – A new programming language by Google

hkis

Everyone knows Google’s obsession with creating different frameworks and launching a few programming languages. Dart was one of the programming languages launched by Google which was object-oriented and a web-based programming language.

Dart programming language didn’t gain a huge response from the developers and hence it never got the position of mainstream programming language. Many programmers prefer C++ and JavaScript over Dart due to their strong background.

One programming language named GO gained quite impressive among developers and GO. GO or GoLang was statically typed and explicit. It was a general-purpose programming language that was similar to the C programming language.

Now Google is all set to launch a new programming language called Carbon programming language. Carbon Language could serve as a successor language to C++, one that provides a simple starting point for developers to a newer language that addresses contemporary development concepts like memory safety and generics.

This would be similar to how Microsoft built Typescript to update JavaScript and Kotlin to strengthen weaknesses in Java. The language was recently unveiled at the CPP North conference in Toronto by Google developer Chandler Carruth.

C++ works, but what’s the problem?

C++ has been around the block for much longer than some of us have been alive. Developed in 1982 and released in 1985, C++ has found its way into operating systems, browsers, and games.

While C++ is not the coolest kid to learn (unless you want to go down the game dev track), but it still holds a strong foothold for applications that requires performance, speed, and is a bit strapped with resource availability.

In a nutshell, C++ is a general-purpose programming language that has all the usual bells and whistles such as classes and objects, abstraction, encapsulation, polymorphism, and inheritance. It’s strongly typed, case sensitive, uses pointers, and has a massive functions library.

So, what’s wrong with C++ ?

The general criticism of C++ is that it leans towards being overly complex. IntelliSense generally sucks, no support for first-class functions and tuples, and initializer lists are considered a ‘hack’. In addition to this, there are a few quirks like duplicate syntax and operators such as the & being both a logical operator and a reference.

Then there’s the issue of each compiler vendor making up their own names and prevents linking modules from different compilers.

There’s a bag full of other problems but in short, C++ works but it has its issues.

What Are The Promises Of Carbon?

Starting from the difficulties experienced in the language and in the governance, Carbon adopts a different approach for both areas.

Language

Carbon wants to start from scratch including:

  • modern generics system,
  • modular code organization,
  • simple syntax.

Carbon wants to be “a successor language […], rather than an attempt to incrementally evolve C++”, carbon-lang.

For this reason, it gave up on transparent backward compatibility while remaining interoperable with and migratable from C++.

Governance

Carbon wants to be more inclusive by:

  • Building on open-source principles, processes, and tools. Contributing is easier and more transparent.
  • Having a clear governance structure that can make decisions rapidly when needed.
  • Expanding the ecosystem with tools that provide a rich developer experience (compiler, standard library, IDE tools), and tool-based upgrades
  • Bridging a gap in the C++ ecosystem with a built-in package manager.

So, when’s the full release?

Currently, Carbon is in an experimental phase. The current roadmap is as follows:

  • Release of a core working version (0.1) by end of 2022
  • 0.2 in 2023
  • Full 1.0 release in 2024–2025

That’s basically it for now. The documentation for Carbon is generally succinct and accessible — even to those who are not C++ developers.