Despite popular belief, Google's open source Carbon programming language is not a strict replacement for C++. Instead, it is designed as a successor. While that may sound like the same thing, the important distinction is that it is intended to be used alongside C++. The interop story is the most important part.
If you are intending to create a new project. Do not use Carbon yet. It is NOT yet ready to be replacement of C++. It is only "first trial of insemination" :)
Hassan Hadi Saleh Carbon is a programming language developed by Facebook, which is designed to be an alternative to C++ for systems programming. Carbon is built on the same principles as C++, with a focus on performance and low-level programming, but it aims to simplify some of the complexities of C++ and improve the developer experience.
Hassan Hadi Saleh The Carbon language is still in development and has not yet been released to the public. Facebook has not provided a lot of information about the language, and it is unclear how good it is at this point. It's still not fully available to the public, so it's difficult to give an accurate assessment of its performance, reliability, and its overall suitability as an alternative to C++.
Hassan Hadi Saleh However, it's worth noting that Carbon is being developed by Facebook, which has a lot of experience with large-scale systems programming and performance optimization. They have a strong team of engineers and researchers working on the language and it's possible that Carbon will be a good alternative to C++ in the future.
Hassan Hadi Saleh It's also worth noting that C++ is a widely used and powerful programming language that has been around for decades and have a large community and lots of libraries, tools, and resources that make it a popular choice for a wide range of applications. Carbon will have to prove itself to be superior in many aspects to be considered a real alternative to C++.
See https://en.wikipedia.org/wiki/Carbon_(programming_language)
This may provide useful perspective. In particular, the language work is from Google, not Facebook, and Google has considerable programming-language development experience. It is also an open-source project, but there is a long way to go toward something like having an ECMA or ISO/IEC international specification and stability, as there is for C/C++, EcmaScript, etc.
Alfa Ba That is the intention. The language is not expected to be at 1.0 until around 2024-2025. I don't see how Carbon is an alternative to C++ at this time.
Observations:
Carbon is also intended to be bidirectionally compatlible with C++, so we'll have to see exactly how that works.
In the meantime, it appears one should stick to C++ (if you want that level of programming) and confine that usage to what Carbon will preserve. This may turn out to be about using good practices for clean C++ programs. Those will need to be tracked down. Meanwhile you will have use of libraries that are usable and suitable for use from C++.
Despite popular belief, Google's open source Carbon programming language is not a strict replacement for C++. Instead, it is designed as a successor. While that may sound like the same thing, the important distinction is that it is intended to be used alongside C++.
Om Shah "[carbon] is intended to be used alongside C++."
I don't understand the significance of that. Surely one is not expected/required to learn both. What is the use case that you have in mind?
Also, is it the intended case that modules created in one can be linked to programs compiled in the other? The `#include` headers and namespaces, and function signatures work interchangeably?
I am puzzled. Is this more a new compiler dialect than a new language? (Like Clang, etc., with respect to C.)
PS: There is a "Hello World" comparison now at https://en.wikipedia.org/w/index.php?title=Carbon_(programming_language)&oldid=1132211631
Based on that sample, I have no desire to learn anything more about Carbon.
Om Shah So this hinges on the idea of "similar feature set." The languages do not appear all that similar, based on the two "Hello World" examples on the Wikipedia page, I have no idea what the measure of "bi-directional interoperability" is intended to be. I also wonder how "readability" is measured.
There are many pairs of languages about which one could identify "similar features sets." Consider Java. Consider the .NET languages where the common runtime/virtual-machine provides interoperability.
I suppose we could compare the ALGOL-like languages too, along with Pascal. Or maybe we should just consider "The Next 700 Programming Languages" with a common applicative-language abstraction.
Yes, Carbon is an alternative to C++. It is intended to be as analogous to C++ as TypeScript is to JavaScript and Kotlin is to Java.
The designers intend for Carbon to support performance-critical software, software and language evolution, and have code that is safe and easy to read and write.