DEV Community

Cover image for Google's New Programing Language : Carbon
Kuldeep Singh
Kuldeep Singh

Posted on • Originally published at programmingeeksclub.com

Google's New Programing Language : Carbon

Introduction

Google has announced a new programming language called Carbon. The Carbon release date is 19 July 2022. Carbon is a general-purpose programming language that was created at Google to be a C++ successor language. A Googler named Chandler Carruth introduced developers to the new programming language called Carbon.

Chandler Carruth, the technical lead for Google programming languages, told us that they would be starting this experimental work with the C++ community. The language will be designed and developed on GitHub.

Why Build Carbon?

C++ remains the dominant programming language for performance-critical software. However, it is struggling to improve and meet developer’s needs, as outlined above, in not above part due to accumulating decades of technical debt and challenges with its evolution process. The best way to address these problems is to avoid inheriting the legacy of C or C++, instead start with solid language foundation such as modern generics system, modular code organization, consistent and simple syntax.

Carbon is fundamentally a successor language approach, rather than an attempt to incrementally evolve C++. A successor language for C++ requires:

  • Performance matching C++, an essential property for our developers.
  • Seamless, bidirectional interoperability with C++, such that a library anywhere in an existing C++ stack can adopt Carbon without porting the rest.
  • A gentle learning curve with reasonable familiarity for C++ developers.
  • Comparable expressivity and support for existing software’s design any architecture.
  • Scalable migration, with some level of source-to-source translation for idiomatic C++ code.

There are a few languages, that have followed this model for other ecosystems, and Carbon aims to fill an analogous role for C++:

  • JavaScript -> TypeScript
  • Java -> Kotlin
  • C++ -> Carbon

Language Goals

They are designing Carbon to support:

  • Performance-critical software
  • Software and language evolution
  • Code that is easy to read, write and understand.
  • Practical safety and testing mechanisms
  • Fast and scalable development
  • Modern OS platforms, hardware architectures, and environments
  • Interoperability with and migration from existing C++ code

Carbon Language is currently an experimental project. There is no working compiler or toolchain. You can see the demo interpreter for Carbon on compiler-explorer.com

You can learn about syntax of carbon programming language here

Top comments (2)

Collapse
 
sorincostea profile image
Sorin Costea

C++ had already a valued successor named Rust but hey that's not from Google...

Collapse
 
imthedeveloper profile image
ImTheDeveloper

Carbon tells you to use rust
github.com/carbon-language/carbon-...