Carbon is an experimental
programming language
A programming language is a system of notation for writing computer programs.
Programming languages are described in terms of their Syntax (programming languages), syntax (form) and semantics (computer science), semantics (meaning), usually def ...
designed for connectiveness with
C++.
The project is
open-source
Open source is source code that is made freely available for possible modification and redistribution. Products include permission to use and view the source code, design documents, or content of the product. The open source model is a decentrali ...
and was started at
Google
Google LLC (, ) is an American multinational corporation and technology company focusing on online advertising, search engine technology, cloud computing, computer software, quantum computing, e-commerce, consumer electronics, and artificial ...
. Google engineer Chandler Carruth first introduced Carbon at the CppNorth conference in
Toronto
Toronto ( , locally pronounced or ) is the List of the largest municipalities in Canada by population, most populous city in Canada. It is the capital city of the Provinces and territories of Canada, Canadian province of Ontario. With a p ...
in July 2022. He stated that Carbon was created to be a C++ successor.
The language is expected to have an experimental
MVP
MVP most commonly refers to:
* Most valuable player, an award, typically for the best performing player in a sport or competition
* Minimum viable product, a concept for feature estimating used in business and engineering
MVP may also refer to:
...
version 0.1 in late 2026 at the earliest and a production-ready version 1.0 after 2028.
The language intends to fix several perceived shortcomings of C++
but otherwise provides a similar feature set.
The main goals of the language are readability and "bi-directional interoperability" (which allows the user to include C++ code in the Carbon file), as opposed to using a new language like
Rust
Rust is an iron oxide, a usually reddish-brown oxide formed by the reaction of iron and oxygen in the catalytic presence of water or air moisture. Rust consists of hydrous iron(III) oxides (Fe2O3·nH2O) and iron(III) oxide-hydroxide (FeO(OH) ...
, that, whilst being influenced by C++, is not two-way compatible with C++ programs. Changes to the language will be decided by the Carbon leads.
Carbon's documents, design, implementation, and related tools are hosted on
GitHub
GitHub () is a Proprietary software, proprietary developer platform that allows developers to create, store, manage, and share their code. It uses Git to provide distributed version control and GitHub itself provides access control, bug trackin ...
under the
Apache-2.0 license with
LLVM
LLVM, also called LLVM Core, is a target-independent optimizer and code generator. It can be used to develop a Compiler#Front end, frontend for any programming language and a Compiler#Back end, backend for any instruction set architecture. LLVM i ...
Exceptions.
Example
The following shows how a program might be written in Carbon and C++:
See also
*
Comparison of programming languages
Programming languages are used for controlling the behavior of a machine (often a computer). Like natural languages, programming languages follow rules for syntax and semantics.
There are thousands of programming languages and new ones are creat ...
*
Timeline of programming languages
This is a record of notable programming languages, by decade.
1790s
1800s
1830s
1840s
1870s
1940s
1950s
1960s
1970s
1980s
1990s
2000s
2010s
2020s
See also
* History of computing hardware
* History of programming lan ...
*
C++
*
D
*
Go
*
Rust
Rust is an iron oxide, a usually reddish-brown oxide formed by the reaction of iron and oxygen in the catalytic presence of water or air moisture. Rust consists of hydrous iron(III) oxides (Fe2O3·nH2O) and iron(III) oxide-hydroxide (FeO(OH) ...
*
Mojo
Mojo may refer to:
* Mojo (African-American culture), a magical charm bag used in Hoodoo
Arts, entertainment and media Film and television
* ''Mojo'' (2017 film), a 2017 Indian Kannada drama film written and directed by Sreesha Belakvaadi
* '' ...
References
External links
*
Carbon language documentationCarbon at the Compiler Explorer (godbolt)
{{Google LLC
Google
Programming languages
Statically typed programming languages
Cross-platform software
Object-oriented programming languages
Programming languages created in 2022
Google software