Discover your dream Career
For Recruiters

C++ is removing a Java feature that nobody knew it had

C++ 23 is coming. While much of the focus is on the features being added to the programming language, there are a few being removed as well. One such feature is garbage collection, a staple of rival language Java, whose removal had swathes of engineers saying "wait... C++ had GC?"

Garbage collection is a feature of code operating through a virtual machine, expected of a language like Java. Its function is to delete code no longer in use by the machine. C++ meanwhile, is a low-level language that speaks directly to hardware, making the need for this seemingly obsolete. But Spotify engineer Sandor Dargo says its most effective implementation "is having virtual machines written in C++ for other languages that are garbage collected."

As pointed out by Dargo, garbage collection has been a part of C++ since 2008, but the new edition will be removing it completely. Those that knew of its existence likely weren't fans either. He says garbage collection was "unimplemented, confusing and pretty useless."

From an algorithmic trading perspective, the fact it would even have GC at all is very ironic. Elite Java traders spend most of their time trying to avoid using it, as the process tends to slow low-latency code down. 

Click here to sign up to our technology newsletter.

Engineers on Hacker News were more shocked at its inclusion in the first place than its removal. "At first glance, I thought this was satirical," one said. Another called it "so obscure that even seasoned people who have worked with this for many years didn't know about it." Chances are it's not the only feature a select few know of; another developer says, "I doubt any one person can keep all of C++ inside their head."

Did you know C++ had garbage collection? Let us know in the comments, or tell us any implementations of it that would actually be worth doing.

Click here to create a profile on eFinancialCareers and make yourself visible to recruiters hiring for top jobs in technology and finance. To stay informed, Sign up here to get Morning Coffee in your inbox or sign up to our new Technology Newsletter

Have a confidential story, tip, or comment you’d like to share? Contact: +44 7537 182250 (SMS, Whatsapp or voicemail). Telegram: @SarahButcher. Click here to fill in our anonymous form, or email editortips@efinancialcareers.com. Signal also available

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 Gary Chan on Unsplash

author-card-avatar
AUTHORAlex McMurray Editor
  • gh
    gh
    11 November 2023

    "Elite Java traders" - seems like a life of pain 😂

  • Wh
    WhiteWolf
    4 November 2023

    I knew C++ had it, because I worked for the people who added it. Geodesic Systems, a long defunct company, built and sold a C++ garbage collector, and pushed to get programmatic support into the language. They were bought out by Symantec around that time. https://dl.acm.org/doi/abs/10.1145/1542431.1542437

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.

Boost your career

Find thousands of job opportunities by signing up to eFinancialCareers today.
Recommended Articles
Recommended Jobs
Paritas Recruitment - Data & Tech
Quantitative Researcher (Systematic Fund)
Paritas Recruitment - Data & Tech
London, United Kingdom
Mason Blake
Global Equity Analyst
Mason Blake
London, United Kingdom
Edgworth Partners
Private Equity Associate - Direct Lending Fund
Edgworth Partners
London, United Kingdom

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.