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

Σε τι χρησιμεύει η θύρα USB του ρούτερ; Μάθετε πώς να αξιοποιήσετε στο έπακρο

Σε προηγούμενες περιπτώσεις, είχε ήδη αναφερθεί ποιες είναι οι πιθανές λειτουργίες της θύρας USB της Smart TV σας. Τώρα σας φέρνουμε έναν παρόμοιο οδηγό, αλλά

Έχεις πολλά! (2023) – κριτική ταινίας [Canal+]. Μια τυπική κωμωδία για την πολωνική νοοτροπία

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

Η χειρουργική βελόνα ARC χρησιμοποιεί ένα κατευθυνόμενο άκρο για να χτυπήσει το στόχο

Οι χειρουργοί στρέφονται ολοένα και περισσότερο σε λιγότερο επεμβατικές τεχνικές, όπως η χρήση μακριών, λεπτών βελόνων -- αντί για νυστέρι -- για την επίτευξη στόχων εντός του

Το Pikmin 4 ανακοινώθηκε στο Nintendo Direct

Κατά τη διάρκεια του Nintendo Direct είδαμε μια σειρά από πολύ τεράστια τρέιλερ. Ένα από αυτά έδειξε το Pikmin 4, που έρχεται στο Nintendo Switch κατά τη διάρκεια του 2023. Μετά από αυτό

Τα Παιχνίδια Google Play για Windows λαμβάνουν πολλές βελτιώσεις μαζί με την ανοιχτή έκδοση beta

Ξεκινώντας τη χρονιά, τα παιχνίδια Android ήρθαν επίσημα στα Windows 10 και 11 μέσω των Παιχνιδιών Google Play. Ωστόσο, μέχρι τώρα αυτή η νέα δυνατότητα παρέμενε κλειστή