Table of Contents
- What factors led to the development of the Carbon language?
- Carbon – A successor of C++
- Features of Carbon
- Carbon Programming Language Explorer
- Where can I ask questions and get information about Carbon?
What factors led to the development of the Carbon language?
As per Carruth’s explanation, bringing improvements in C++ is difficult. The obstacle to the language’s progress is a bureaucratic committee approach that prioritizes standardization over design. It makes adding new features challenging. Kotlin, Swift, Go, Rust, and many other existing programming languages offer an outstanding development experience.
Developers who are capable of using one of these current languages can keep using those. However, adoption and migration from C++ are severely hindered by the designs of these languages. These aspects led to the development of carbon – an open-source programming language.
Carbon- A successor of C++
Let us know first what is the meaning of the successor language. In line with what Carruth has stated a successor language is defined by the below-mentioned qualities:
- Must have built on an existing ecosystem without bootstrapping a new one.
- Provide a bi-directional interoperability
- Ideally, have tool-assisted migration support
- Optimize the learning curve and adoption path
Carbon might be the next step in the evolution of software and programming languages. According to Github documentation, as an experimental successor of C++, carbon language will support the below-listed goals.
- 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
The main emphasis will be on writing and reading simple code. It will also be a language for swift and scalable development. It will support all the existing operating system platforms. It will also include a strengthened and safe testing framework for complicated codes.
Features of Carbon:
Interoperability With C++
For those developers who are proficient in C++, Carbon would be a simple learning curve. It is composed of a fixed set of grammatical constructions that are meant to sound natural and be simple to read and comprehend.
Carbon provides a modern generics system with verified definitions. Yet, opt-in templates are still supported for flawless C++ interoperability.
The generics system delivers C++ templates many benefits, including:
- Generic definitions are type-checked. This eliminates the need to check the definition for each instantiation at the cost of compile time.
- Strong, verified interfaces reduce unintentional reliance on implementation specifics and make the relationship with consumers more apparent.
Carbon strives to handle memory safety, a significant issue troubling C++ developers, by:
- Improving the tracking of uninitialized states, toughening against initialization errors, and enhancing initialization implementation.
- Having a standard debug build mode that is more detailed than the build modes offered by C++.
Carbon Programming Language Explorer
Want to give it a try? Carbon Explorer is a prototype interpreter demo that can both execute isolated instances and provide a thorough examination of the particular semantic model and abstract machine of Carbon.
Where can I ask questions and get information about Carbon?
We hope this gives a proper insight into what Carbon is and what this experiment aspires to execute. There is documentation available for developers and tech-savants to resolve every and any queries there may be available. Also, volunteers can contribute to the development process. This new language by Google may take time to be used for real projects, but this open-source technology seems promising to overcome C++ challenges and might change the face of software development.