Do We Need Another Programming Language?
This week, a Google engineer introduced a new project to build a programming language from scratch, called Carbon.
Just as Microsoft built TypeScript to update JavaScript, and Kotlin was created to shore up weaknesses in Java, Carbon could serve as a successor language to C++, one that offers an easy jumping-off point for developers to a newer language that addresses modern development concepts such as memory safety and generics.
C++ has long been the language of choice for building performance-critical applications, though it is plagued with a number of issues that hamper modern developers. It has accumulated decades of technical debt, and its tooling ecosystem is fragmented at best. Plus the language does not offer an easy way to ensure memory safety, which has been a source of many bugs and security vulnerabilities.
Though Carbon seeks to answer these shortcomings, many have wondered if we need an entirely new language to address these concerns.
For instance, Rust, another low-level performance-oriented language, also offers memory safety. Carbon, however, was built for people who’d rather not learn an entirely new language. Rather it was designed for those already familiar with the syntax of C++.
“If you have a large legacy C++ codebase that makes heavy use of misfeatures, migrating to Carbon will definitely be easier, because Rust doesn’t have those misfeatures. But also, the result won’t be memory safe,” tweeted infrastructure engineer Tony Arcieri.
This lack of memory safety is an important point. While the Carbon engineers promise features that will ensure memory safety, they are not in place yet. And this is a sticking point for many.
“It takes an enormous amount of effort to bring a new language into the world and make it useful, to port code, reimplement core libraries. If you aren’t getting safety out of it, why incur that cost? Is the end result actually better, or just more pretty?” Swift language designer Doug Gregor pointed out in a Twitter thread.
Many people underestimate the tooling that C++ already has to prevent memory errors. As one disgruntled reader on Hacker News grumbled. “The problem with the typical rants about C++ is that you guys are outdated.”
What do you think? Is it time for a new low-level performance-wise programming language to take the place of C++? Or is Google getting too impatient with the evolution of C++ itself?
|