This question was asked on Quora, but I feel dev.to is a more concentrated place to discuss this as there are thousands of active developers here.
A top answer concluded Carbon have no chance of replacing C++; the language is a result of (mostly) Googlers throwing tantrum after C++ standardisation committee voted against ABI braking changes in C++23. And that there might be some hype at the beginning, similar to what happened with Go, but then it'll land in its niche, mostly in Google's projects.
Well, Carbon may end that way, and it may not.
After spending a weekend exploring the language, I feel the language got a chance. Although I wrote a 2000 words article on 7 heated Reasons why I don't want to become a Carbon Developer.
Carbon's goal is to be the successor to C++. Carbon is designed to match the performance of C++ with LLVM while being able to interrupt with the existing C++ codebase. That means it can do what C++ can do and you don’t have to throw away your C++ code.
Now, that’s a big deal because most C++ coders I know are feeling stuck with C++ and they want something new, but when it comes to building high-performance low-level systems there is just no match for C++ out there.
C++ is a prolific language for doing low-level stuff. However, because Carbon is a modern alternative that is designed to equal C++ performance while being able to connect with existing C++ code, it may “replace” C++.
“replaced” not that C++ will no longer be useful, but in terms of relevance. It will still be there, but you may not see the need when you can use efficiently use Carbon.
This is not going to happen tomorrow or next. C++ will still be relevant in the next decade.
That being said, Carbon is an experiment. There are no guarantees, it may fail to meet its goal.
There are many reasons Carbon might fail to succeed C++, it not just matching performance. I think much of it has to do with developer adoption - something outside of Google’s control.
Many developers love C++ and they don't want it to go away even if they know it has many faults. The most upvoted answer to this question on Quora didn't really care what Carbon has to offer but rather about the game engine he is building with C++ and how much he loves to code with C++.
Think Rust? projected as a C++ killer and also a wonderful language. But a good number of C++ dev don't want to code with Rust. It is now gradually carving out its own niche (found a space in crypto).
While Carbon is designed to match C++ performance, it still has a long way to go. For me, the biggest problem is Developer Adoption.
Will the C++ community embraced it as the Carbon thing hoped they do? It's a thing of hope.
What do you think?
Over to you. What do you think about Carbon vs C++, will it replace it? will it end up finding its own nitch, what are your thoughts?
Top comments (5)
If I look at where C++ is currently used, I can identify 3 main domains :
Concerning embedded application, they have a very long and complicated development cycle. You are generally closer to traditional hardware industry with waterfall model than agile methodology, and things evolve very slowly. Even more when certification come into place (I'm looking at you DO-178 !). This industry is currently slowly migrate from C to C++, so clearly, C++ will stay there for the next decade at least.
Concerning Desktop application, they are there since a decade or two, with thousands or millions lines of code, and you won't rewrite them with the newly trending technology just for fun. You can write new feature in Carbon, but you need C++ developers for maintenance anyway. So again, C++ will remain for some times.
Video game industry is a different topic. This industry has lower maintenance issues and shorter development cycle than the 2 below. Furthermore, Game developers are generally passionate peoples that like using new technologies, as long as performances are there 😊. So I tend to think that Rust or Carbon may have a card to play here.
Thank you @tandrieu for taking the time to comment. I agree with most things you said.
The reality Carbon has to face is the fact that C++ is heavily invested.
Like I mentioned in the main content, I made a previous submission where I stated reasons why I hate to become a Carbon Developer. You may want to check it out especially if you have spent most of your time coding with Javascript and other intepreter languages.
Just in case, this part explains a lot about Carbon's goals:
github.com/carbon-language/carbon-...
Yeah...thanks for the reply.