Chandler Carruth Announces Carbon

Chandler Carruth just announced today a new programming language called Carbon, an experimental language that is supposed to be the successor of C++.

This is another language backed by Google. At least, until they create a foundation to manage the language and its progress.

The language is still at version 0.1, and it already has a lot of features that are captivating.

It is still considered experimental, and it doesn’t seem to be a direct competitor of Rust. Or at least not in theory. Carruth says that the language is supposed to be a replacement of C++, but it should interoperate with it, something that is very hard to do with Rust.

The syntax seems to be a cross between Rust and Go, two of my favourite languages, and I must say that I actually liked it. However, I wonder if this new language will go mainstream just like Go and Dart.

As for features, I’ll just share the ones I grabbed from Phone World:

  • Introducer keywords and a simple grammar
  • Function input parameters are readonly values
  • Pointers provide indirect access & mutation
  • Use expressions to name types
  • The package is the root namespace
  • 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

If you want to play around with the language, then you can have download the project’s source code on GitHub.

Related Posts:

  • Why I Chose Golang Over Rust In 2019 I was looking for a new, modern programming language to replace Java as my main language. I needed to rewrite an interpreter in a faster programming language as Java wasn’t quite working any more. My options were Rust, Go and Swift, from which I shortlisted Rust and Go. Read More
  • The Struct Embedding Trap in Go Go is a programming language that uses composition over inheritance. Yet, it provides a feature known as Struct Embedding that abstracts this, and makes it seem as if Go supports inheritance, leading us to make wrong assumptions and fall into a trap I’ll demystify in this article. Particularly for those coming from an object-oriented language like Java. Read More