Hello Stackers, Carbon is fundamentally a successor language approach, rather than an attempt to incrementally evolve C++. It is designed around interoperability with C++ as well as large-scale adoption and migration for existing C++ codebases and developers. A successor language for C++ requires:
- Performance matching C++, an essential property for our developers.
- Seamless, bidirectional interoperability with C++, such that a library anywhere in an existing C++ stack can adopt Carbon without porting the rest.
- A gentle learning curve with reasonable familiarity for C++ developers.
- Comparable expressivity and support for existing software’s design and architecture.
- Scalable migration, with some level of source-to-source translation for idiomatic C++ code.
With this approach, we can build on top of C++’s existing ecosystem, and bring along existing investments, codebases, and developer populations. There are a few languages that have followed this model for other ecosystems, and Carbon aims to fill an analogous role for C++:
- JavaScript → TypeScript
- Java → Kotlin
- C++ → Carbon
We want to better understand whether we can build a language that meets our successor language criteria, and whether the resulting language can gather a critical mass of interest within the larger C++ industry and community.
Carbon
Quick Start
As there is no compiler yet, to try out Carbon, you can use the Carbon explorer to interpret Carbon code and print its output. You can try it out immediately at compiler-explorer.com.
To build the Carbon explorer yourself, follow these instructions:
# Install bazelisk using Homebrew. $ brew install bazelisk # Install Clang/LLVM using Homebrew. # Many Clang/LLVM releases aren't built with options we rely on. $ brew install llvm $ export PATH="$(brew --prefix llvm)/bin:${PATH}" # Download Carbon's code. $ git clone https://github.com/carbon-language/carbon-lang $ cd carbon-lang # Build and run the explorer. $ bazel run //explorer -- ./explorer/testdata/print/format_only.carbon
These instructions assume Homebrew is installed; see our contribution tools documentation for more extensive tooling instructions.
Okay That’s All folks, for the full documentation please refer on here.. cyaa