Previous form didn't include *.BUILD or *.bzl files by acceident -- this new form is simpler and more correct, with no issues detected. Co-authored-by: Chandler Carruth <chandlerc@gmail.com>
Carbon language
The Carbon Language project is an experiment exploring a future direction for the C++ programming language.
Carbon goals | Carbon and C++ | Take a look | Join us
Fast and works with C++
- Performance matching C++ using LLVM, with low-level access to bits and addresses
- Interoperate with your existing C++ code, from inheritance to templates
- Fast and scalable builds that work with your existing C++ build systems
Modern and evolving
- Solid language foundations that are easy to learn, especially if you have used C++
- Easy, tool-based upgrades between Carbon versions
- Safer fundamentals, and an incremental path towards a memory-safe subset
Welcoming open-source community
- Clear goals and priorities with robust governance
- Community that works to be welcoming, inclusive, and friendly
- Batteries-included approach: compiler, libraries, docs, tools, package manager, and more
Carbon goals
We believe Carbon must support:
- Performance-critical software
- Software and language evolution
- Code that is easy to read, understand, and write
- Practical safety and testing mechanisms
- Fast and scalable development
- Modern OS platforms, hardware architectures, and environments
- Interoperability with and migration from existing C++ code
While many languages share subsets of these goals, what distinguishes Carbon is their combination. For the Carbon project, they are prioritized in the above order to help make clear what tradeoffs we intend to make. However, each and every goal remains critically important: Carbon must have excellent C++ interoperability and migration to be successful.
Read the language overview for more on the language design itself, and the goals for more on these values.
Carbon and C++
If you're already a C++ developer, Carbon should have a short learning curve. It is built out of a consistent set of language constructs that should feel familiar. C++ code like this:
can be mechanically transformed to Carbon, like so:
without loss of performance or readability. Yet, translating C++ to Carbon isn't necessary; you can call Carbon from C++ without overhead and the other way around. You can port your library to Carbon, or write new Carbon on top of your existing C++ investment. Carbon won't add a sea of dependencies or slow down your performance-critical code. For example:
In terms of safety, any language that can seamlessly call C++ will not be perfectly safe in every dimension. However, Carbon's design encourages you to use safe constructs where possible.
Ultimately, C++ carries a significant historical legacy, including around ABI stability, that constrains its evolution. Carbon is an attempt to set a new direction for C++ developers that allows for fast development, flexibility, and delight without sacrificing performance, interoperability, and familiarity.
Read more about C++ interop in Carbon.
Take a look
Learn more about Carbon's design:
Join us
Carbon is committed to a welcoming and inclusive environment where everyone can contribute.
- To watch for major release announcements, subscribe to our Carbon release post on GitHub and star carbon-lang.
- To join the design discussion, join our our Github forum.
- See our code of conduct and contributing guidelines for information about the Carbon development community.
- We discuss Carbon on Discord; a public link will be forthcoming.
