Will Carbon replace C++

google-introduces-a-new-programming-language-0-IPw2j5FN.webp

Google has just released 0.1 now. Carbon 1.0 will be available around 2024–2025. The purpose is to allow the developer community from disparate origins to have enough representation early on.

History battle to replace C++

Programmers have been creating a viable C++ alternative.

In the 90s, Sun Microsystems came up with Java. Its main selling point was to run cross-platform inside a VM to smarten millions of appliances. It attained quite by retaining C++-like OOP but eliminating the ugly pointer management.

Java enjoying the best time because of the blooming era of WEB. Were it became the king of application servers. Within a decade, Java’s syntactic sibling JavaScript took over the web. JavaScript's journey didn’t culminate even after its server-side counterpart Node.js. It’s still growing.

Replacing C++ was at the core of language evolution all that time. Having a garbage collector-backed runtime, Java eliminated the memory management problem but fell short of attaining the native performance of C/C++ because of its architecture.

Usefulness of C++

C/C++ continued to be at the best bridge of both commercial and non-commercial systems that were developing in parallel:
  • Google, Facebook, Amazon, Twitter, and Bing — all have their core application logic written using C/C++.

  • The Android operating system runs on Linux kernel, which is written in C. Linux is written in C. Mac OS and iOS are offshoots of BSD-based Unix, which is heavily written in C.

  • Git and Subversion version control systems are written in C. All databases (Oracle, Postgres, MySQL, IBM Db2, SQL Server — the list is endless) are written in C/C++.

Difficulties of C++

Long story short:
  • Due to the steep learning curve, fewer developers learn C/C++, and even less master it.

  • Maintaining huge, old, and complex code falls on the shoulders of below-average developers, who perform quick fixes, contributing to the technical debt.

  • memory related errors caused by bad memory management

  • Bug-ridden code poses a steeper learning-curve challenge for the next generation of coders. The cycle goes on.

Hello to the World Carbon

Here is a hello World code snippet of Carbon

Google to build Carbon

Being built in open, some may think Carbon development may follow a similar trajectory as Dart due to its over-dependence on community.

There is no reason to be pessimistic about Carbon, though.

Here, Google’s aim is rooted in evolving C++ — a task that became a thorny path due to the extremely bureaucratic evolution of the world’s most archaic application-level language.

To achieve this aim, Google has made Carbon open quite early in the development (1.0 is awaited in 2024–25). Google has also made it a rule not to have any single organization contribute more than 50% to eradicate monopolistic hijacking.

Feel Free to have a look into its GitHub