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

Je hebt veel! (2023) – filmrecensie [Canal+]. Een typische komedie over de Poolse mentaliteit

The movie "You're in luck!" tells the story of the Bednarski family, who learn that their deceased grandfather Józef (Mikołaj Grabowski) was buried with a

Donner herontdekt de oude, krachtige en geweldige digitale piano met de DDP-80

De DDP-80 is een stijlvolle digitale piano met een vintage design met de klank van een akoestische vleugel.

Donner herontdekt de oude, krachtige en geweldige digitale piano met de DDP-80

De DDP-80 is een stijlvolle digitale piano met een vintage design met de klank van een akoestische vleugel.

Google werkt naar verluidt aan een zelfstandige weer-app

Het lokale weer controleren op een Android-telefoon is ingewikkelder dan we hadden verwacht. Er is nog steeds geen speciale app, wat betekent dat je beperkt bent tot het krijgen van weer

De nieuwe Google Weather lijkt een zelfstandige app te zijn, geïntegreerd met Google Clock

We weten al hoe de nieuwe Google Weather eruit zal zien op telefoons, tablets en opvouwbare apparaten, en nu leren we dat het een zelfstandige app moet zijn.