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.