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

nothing phone (1) can’t finally use snapdragon 7 gen 1

Almost everyone is hoping that the Nothing Phone (1) will use the Snapdragon 7 Gen 1 SoC, but it won't, it seems. The Nothing Phone (1) appeared on Geekbench,

Electronic peepholes do not need the permission of the neighbors: Data Protection opts between security and privacy

A few days ago we saw what was needed to be able to install a connected doorbell or an electronic peephole at home. An increasingly common elementboth for

You can now buy the new Sony Smart TVs at El Corte Inglés and with a very interesting cashback

A few days ago we announced the arrival in Spain of the new 2022 Sony Smart TVs. And today The English Court It has already put all the models on sale, except

Starfield: 5 things that have not fully convinced us

Finally, after various occasions in which the game had shown itself with a lot of modesty (or, in practice, it hadn't really done it), the highly anticipated

Polygon’s MATIC Up 20% Amid Whale Accumulation, Carbon Neutrality Push – Decrypt

Polygon, the Ethereum Layer 2 scaling solution, has seen its MATIC token increase by over 20% in the past day.