C++ has faced increasing scrutiny over memory safety concerns, with rising initiatives like TrapC and Safe C++ emerging to address these issues. However, Bjarne Stroustrup, the creator of C++, remains a staunch advocate for implementing “profiles” as the key to ensuring memory safety in the language. In a recent communication to the ISO C++ committee, Stroustrup highlighted the importance of profiles for imposing constraints on existing features while maintaining the language’s flexibility and core strengths.
Profiles, as Stroustrup argues, provide a structured framework for integrating various safety mechanisms into C++ without introducing compatibility-breaking changes. In his February 7 note to the committee, he underscored that type safety and resource safety, including memory safety, were foundational goals of C++ when it was first designed. He warned that without adopting a flexible framework of profiles, C++ could face a decline, especially as memory safety concerns continue to grow. “The sky isn’t falling,” he noted, but urgent action is needed to ensure the language’s continued relevance in a world increasingly focused on security.
Stroustrup’s stance on profiles is part of a broader effort to safeguard C++’s future. He stressed that the introduction of profiles would not disrupt existing codebases nor block the introduction of new, desirable features. Instead, profiles represent an evolutionary step in C++’s long history of adapting to new demands without sacrificing its original design principles. Stroustrup has advocated for the inclusion of initial profiles in the upcoming C++ 26 standard, cautioning that ad hoc restrictions could lead to fragmentation and potential harm to the language’s development.
This call to action is particularly timely as C++ faces heightened pressure from regulatory bodies in the US and European Union. In February 2024, the White House raised concerns about languages with inherent memory safety issues, specifically naming C++ and C. Stroustrup, acknowledging these regulatory challenges, has reiterated that profiles offer a balanced solution—enabling the C++ community to address safety concerns while preserving the language’s performance and efficiency. As the debate over memory safety continues, Stroustrup’s proposal for profiles stands as a critical step in ensuring that C++ remains a secure and viable language for the future.