Discover your dream Career
For Recruiters

C++ creator Bjarne Stroustrup says language isn't a 'failed Java'

C++ is an old language. It was first conceived almost half a century ago and has undergone constant changes and tweaks ever since. Writing this week on a blog for the Association for Computing Machinery, C++'s creator Bjarne Stroustrup says the initial versions of the language didn't quite match his ideal vision. C++ techniques used in the past were "outdated, unsafe and hard-to-maintain," admits Stroustrup. However, he says fixing legacy code that used those techniques isn't easy. 

Click here to follow our new WhatsApp channel, and get instant news updates straight to your phone 📱.

Stroustrup, who left an MD role at Morgan Stanley to teach at Columbia University in 2022, says compatibility with previous versions of C++ is "immensely important," but that modern C++, is simpler, safer and faster "in essentially all cases." Because the language is constantly changing, he says that online advice and teaching resources often contain "confusing and outdated information." He says some resources view C++ as "a minor extension of C" while others see it as "a failed attempt to design Java."

C++ isn't trying to be either language. Stroustrup says he has specific ideals for it, including static type safety, performance, efficiency and direct access to hardware. These ideals are steering the language's evolution. Take coroutines, a performance-focused technique new to C++23 which Stroustrop says was "missing for decades, though they were an essential part of early C++."

Newly written code doesn't always match Stroustrup's intentions. Large corporations like banks have millions of lines of pre-existing C++ code using "outdated-style interfaces," and the engineers working on that code often replicate the style trends that they see. To modernize C++ code and reflect his ideals, Stroustrop says "only gradual adoption of novel features and techniques is feasible." 

Perhaps AI might be the key to speeding up this gradual adoption. Goldman Sachs said in 2023 that one of the best use cases for GenAI was to understand and analyze pre-existing code. This makes it easier for engineers with more modern C++ practices to interact with legacy code and should make the process of updating it much easier.

Stroustrup has also made a set of guidelines to create "C++ on steroids." Under these guidelines, the language keeps its compatibility with legacy code without "relying on massive run-time checking," and leaving space for "messy, dangerous, low-level features" to be implemented. Broadly, the rules include that you should have no type violations, no uninitialized variables and no invalidation. Stroustrop points to two of his books that teach C++ within those guidelines: 'Programming: Principles and Practice using C++' for novices and 'A Tour of C++' for experts.

Have a confidential story, tip, or comment you’d like to share? Contact: Telegram: @AlexMcMurray, WhatsApp: (+1 269 237 3950). Signal: @AlexMcMurrayEFC.88 Click here to fill in our anonymous form, or email editortips@efinancialcareers.com.

Bear with us if you leave a comment at the bottom of this article: all our comments are moderated by human beings. Sometimes these humans might be asleep, or away from their desks, so it may take a while for your comment to appear. Eventually it will – unless it’s offensive or libelous (in which case it won’t.)

Photo by Markus Spiske on Unsplash

author-card-avatar
AUTHORAlex McMurray Reporter
  • [Deleted]
    5 February 2025

    [Deleted]

Sign up to Morning Coffee!

Coffee mug

The essential daily roundup of news and analysis read by everyone from senior bankers and traders to new recruits.

Sign up to Morning Coffee!

Coffee mug

The essential daily roundup of news and analysis read by everyone from senior bankers and traders to new recruits.