Safe C++ Extensions proposal would provide C++ developers with memory-safe implementations of essential data structures and algorithms, along with features that prevent common memory-related errors. Credit: worradirek / Shutterstock Concerns about C++ memory safety soon could be in the past. The C++ Alliance, a charity whose mission is to make the C++ language accessible and useful, is working to add memory safety features to C++, through its Safe C++ Extensions proposal. The alliance intends to submit the Safe C++ Extensions proposal to the ISO for inclusion in the C++ standard. Partnering with engineer Sean Baxter, the C++ Alliance describes its plan as a “revolutionary” proposal. “This collaboration marks a significant milestone in the C++ ecosystem, as the need for safe code has never been more pressing,” alliance president and director Vinnie Falco wrote in a September 12 blog post. “With the increasing importance of software security and reliability, developers are facing mounting pressure to adopt safer coding practices. The Safe C++ Extensions aim to address this critical need by introducing novel features that prevent common memory-related errors.” C++ and the C language have been the target of criticism by the White House, which in February urged developers to stop using these languages over memory safety concerns. C++ founder Bjarne Stroustrup responded by defending the language. The Safe C++ Extensions proposal aims to turn the tide for C++. A key component of the plan is the Safe Standard Library, which would provide developers with memory-safe implementations of essential data structures and algorithms, according to Falco. The goal of the proposal is to advance a superset of C++ with a “rigorously safe subset,” the proposal states. C++ code in this safe context would exhibit the same strong safety guarantees as code written in Rust, it says. The Safe C++ Extensions proposal contrasts ISO C++ with Safe C++. “In ISO C++, soundness bugs often occur because caller and callee don’t know who should enforce preconditions, so neither of them do. In Safe C++, there’s a convention backed up by the compiler, eliminating this confusion and improving software quality.” In the introduction to the proposal, the C++ Alliance acknowledges issues with the language. “Much of the country’s critical infrastructure relies on software written in C and C++, languages which are very memory-unsafe, leaving these systems more vulnerable to exploits by adversaries.” However, Safe C++ developers would be prohibited from writing operations that may result in undefined behaviors that compromise lifetime safety, type safety, or thread safety. Related content feature What is Rust? Safe, fast, and easy software development Unlike most programming languages, Rust doesn't make you choose between speed, safety, and ease of use. Find out how Rust delivers better code with fewer compromises, and a few downsides to consider before learning Rust. By Serdar Yegulalp Nov 20, 2024 11 mins Rust Programming Languages Software Development how-to Kotlin for Java developers: Classes and coroutines Kotlin was designed to bring more flexibility and flow to programming in the JVM. Here's an in-depth look at how Kotlin makes working with classes and objects easier and introduces coroutines to modernize concurrency. By Matthew Tyson Nov 20, 2024 9 mins Java Kotlin Programming Languages analysis Azure AI Foundry tools for changes in AI applications Microsoft’s launch of Azure AI Foundry at Ignite 2024 signals a welcome shift from chatbots to agents and to using AI for business process automation. By Simon Bisson Nov 20, 2024 7 mins Microsoft Azure Generative AI Development Tools news Microsoft unveils imaging APIs for Windows Copilot Runtime Generative AI-backed APIs will allow developers to build image super resolution, image segmentation, object erase, and OCR capabilities into Windows applications. By Paul Krill Nov 19, 2024 2 mins Generative AI APIs Development Libraries and Frameworks Resources Videos