Google launches Carbon to be a Successor of C++
Google introduced a new programming language named carbon, which is an experimental replacement for C++.
advertisement
Till today, Google has created different frameworks and introduced various programming languages such as front-end typescript, PHP back-end, C++, Java, Python, and Golang. Some all, become prominent and more popular than else. For example, Golang or Go was introduced to improve the development of servers and distributed systems that have since been familiar to the public.
Google believes that carbon is the latest programming language that can topple C++ programming that’s why they come up with this new experimental language. It is first presented publicly at the CppNorth conference in Toronto by Carruth chandler in July 2022. Googler chandler shared the innovation for this new language carbon that is going to be the experimental successor of C++.
advertisement
Before the carbon, Rust, a Mozilla project was considered a successful programming language as a successor to C++. As you all know that Google has continuously launched languages that are more updated versions of backward compatible languages like Typescript is the successor of JavaScript. Java is a successor of kotlin. C++ is itself a successor of the C programming language But, C++ was no replacement yet.
Carbon can be a revolution for developers, easier and safer to use. It is partly forward-compatible but not backward-compatible with C++.
Advantages of Carbon programming language
Developers say that carbon programming language is now in an experimental state. However, Carbon has many of the same goals as Rust such as;
- It will come up with tools to automatically port the code from each version to the next update.
- Carbon is the best alternative to objective language.
- Carbon language will enhance the capability of the software.
- Carbon’s coding base is vast and easy to understand for developers.
- Carbon language has complete harmony with C++
Why did Google move from C++ to carbon?
Google feels needs the feature of memory safety which is the lacking point of C++. Due to this reason, memory access bugs is one of the biggest culprits of security threat. Carbon language developers will look for better methods to design idioms and APIs that build a comprehensive build mode of debugging and will support dynamic bound checks.
According to the documentation of carbon, the language will assist with these features:
- Performance-critical software
- Introducer the simple grammar and keywords
- language evolution and software
- Code that is easy to write, read and understand
- Testing mechanisms and Practical safety
- Classes are final by default and have single inheritance
- Definition powerful and check-generic
- Scalable and fast development
- Hardware architectures and Modern OS platforms
- Interoperability of migration from existing C++ code.
advertisement
Comparison of C++ and Carbon in coding
Google development team plans to write the translation tool that migrates codes of C++ into a new carbon language. So, here is an example of computer coding C++ vs. carbon.
First the C++ code
And now here is the same function written into Carbon language.
Basic Goal of Carbon launches
advertisement
Google recently launches the rust language. If you are thinking that then why not rust? So, it is simply that the memory-safety needs and performance of applications are specifically addressed and need improvement.
During the presentation, Carruth announces that those using rust language…can continue it. Carbon is for those who have vast codebase migration issues within C++. They face difficulties to migrate the codes in rust programming. That’s why carbon is introduced as a successor language.
Admin – Administrator
Founder & Administrator of this website. If you want my services please CONTACT ME.