Carbon, a new programming language from Google, aims to be the successor to C++



Carbon, the latest programming language to be produced within Google, was unveiled today as an experimental successor to C++.

Over the years, Google has created a few programming languages, some of which have become more popular and prominent than others. For example, Golang (or simply Go) was created with the aim of improving the development of servers and distributed systems and has since been adopted by the public. Meanwhile, the Dart programming language, which was originally intended as an alternative to JavaScript, did not reach mainstream popularity until the release of Flutter.

Today at the CPP Answers conference in Toronto, as Conor Hoekstra. shared by For those who attended and documented the slides, Googler Chandler Carruth shared the vision for a new programming language called Carbon. To set the scene, Caruth showed how many of today’s most popular programming languages have successors that allow developers to be increasingly productive and also take advantage of modern language design.

Android developers are well aware that Kotlin serves as the successor to Java, just as iOS developers know that Swift is the successor to Objective-C. TypeScript from Microsoft has fully extended JavaScript, while being intuitive to use and capable of being “transpiled” into JavaScript. C++, which sees a significant amount of use within Google, is a similar successor to the original C programming language.

While some might suggest that Rust, originally a Mozilla project that has since grown to a significant public following, is the successor to C++, Carruth wonders if the analogy still follows. does. While Rust is undeniably a great language for starting a new project, it doesn’t have the “bi-directional interoperability” of something like Java and Kotlin, which makes it difficult to migrate consistently.



If rust works for you today, you should use it. But the C++ ecosystem has to be moved to Rust Tough,

To that end, while Carbon has many of the same goals as Rust, such as helping developers build “performance-critical software”, Carbon is also intended to be fully interoperable with existing C++ code. Additionally, the goal is to make it as easy as possible to migrate from C++ to Carbon, if desired.

On why a C++ developer might want to consider introducing Carbon to their codebase, Caruth shared some of the language’s highlights on the forum.

  • Introducing Keywords and a Simple Grammar
  • Function input parameters are read-only values
  • Pointers provide indirect access and mutability
  • Use expressions to name types
  • package root namespace is
  • Import APIs via their package name
  • Explicit object parameter declares a method
  • single inheritance; Classes are final by default
  • Powerful, Definition-Checked Generics
  • Types explicitly implement interfaces

Beyond language features, the Carbon team drew attention to the development process that would shape Carbon’s future. The project’s code is publicly hosted on GitHub and open to pull requests, while Carbon’s culture is described as being accessible and inclusive to employees of companies and private individuals alike.

That said, one aspect of the Carbon programming language that isn’t particularly well outlined is Google’s involvement. While today’s presentation was shared by a Googler, and the current project lead for Carbon mainly – but not entirely – Googlers, there is otherwise no mention of Carbon being a Google project.

This is actually intentional, because when Carbon made its debut within Google, the team understands and has shared online that for any future success, Carbon needs to be “an independent and community-driven project”, not just Powered by Google’s own uses. In the same remarks, Carruth further emphasized that carbon is currently only an experiment, although some companies have already shown interest in it.

If you’re interested in getting started with Carbon, you can download the source code and use it on your device. Or, you can get the feel of the Carbon programming language directly in your browser thanks to integration with the free Compiler Explorer web app.

An earlier version of this article incorrectly stated that all of Carbon’s leads are Google employees. We are sorry for the mistake.

FTC: We use income generating auto affiliate links. More.

Check out 9to5Google on YouTube for more news:

Source



Related News

iPhone 14 leaker hints at key features for all four new iPhones

An alleged iPhone 14 battery specs leak claims to have some minor improvements to the four rumored upcoming models, as well as a surprising downgrade.

The Samsung Galaxy Z Flip 4 may be the most colorful and customizable phone ever

If you don't like to be limited to a few color options for your smartphone then the Samsung Galaxy Z Flip 4 could be the handset for you, as a new leak has

Clear your Android phone’s cookies and cache to get rid of extra junk files

Just like on PC, cleaning junk files on your Android phone is good every now and then. Clearing the cookies and cache on your Android phone's web browser is a

Scalar 2 is now available for iPad, with desktop version v2.6. has been updated in

Plugin Boutique has announced the release scaler 2 for ipadMaking popular music theory workstations available to mobile music makers.

Spotify will bring social features to mobile apps with “Community”

Spotify is finally preparing to add some social features to its mobile apps. The company is developing a dedicated hub called Community where users will be

Google wants to fix battery optimization with the help of developers

The Android battery optimization and process management is a mess. To save battery life, some mobiles close background apps very aggressively, which results