MacMusic  |  PcMusic  |  440 Software  |  440 Forums  |  440TV  |  Zicos
safety
Search

Can C++ Be Safer? Bjarne Stroustrup On Ensuring Memory Safety

Sunday February 12, 2023. 04:34 PM , from Slashdot
C++ creator Bjarne Stroustrup 'joins calls for changing the programming language itself to address security concerns,' according to an article shared by Slashdot user guest reader:

In mid-January, the official C++ 'direction group' — which makes recommendations for the programming language's evolution — issued a statement addressing concerns about C++ safety. While many languages now support 'basic type safety' — that is, ensuring that variables access only sections of memory that are clearly defined by their data types — C++ has struggled to offer similar guarantees. This new statement, co-authored by C++ creator Bjarne Stroustrup, now appears to call for changing the C++ programming language itself to address safety concerns. 'We now support the idea that the changes for safety need to be not just in tooling, but visible in the language/compiler, and library.' The group still also supports its long-preferred use of debugging tools to ensure safety (and 'pushing tooling to enable more global analysis in identifying hard for humans to identify safety concerns'). But that January statement emphasizes its recommendation for changes within C++.

Specifically, it proposes 'packaging several features into profiles' (with profiles defined later as 'a collection of restrictions and requirements that defines a property to be enforced' by, for example, triggering an automatic analysis.) In this way the new changes for safety 'should be visible such that the Safe code section can be named (possibly using profiles), and can mix with normal code.' And this new approach would ultimately bring not just safety but also flexibility, with profiles specifically designed to support embedded computing, performance-sensitive applications, or highly specific problem domains, like automotive, aerospace, avionics, nuclear, or medical applications.

'For example, we might even have safety profiles for safe-embedded, safe-automotive, safe-medical, performance-games, performance-HPC, and EU-government-regulation,' the group suggests. Elsewhere in the document they put it more succinctly. 'To support more than one notion of 'safety', we need to be able to name them.'


Stroustrup emphasized his faith in C++ in a 2020 interview. âoeI think C++ can do anything Rust can do, and I would like it to be much simpler to use,' Stroustrup told the Association for Computing Machineryâ(TM)s Special Interest Group on Programming Languages.

But even then, he'd said that basic type safety was one of his earliest design goals — and one heâ(TM)s spent decades trying to achieve. âoeI get a little bit sad when I hear people talk about C++ as if they were back in the 1980s, the 1990s, which a lot of people do. They looked at it back in the dark ages, and they havenâ(TM)t looked since.â

Read more of this story at Slashdot.
https://developers.slashdot.org/story/23/02/11/178222/can-c-be-safer-bjarne-stroustrup-on-ensuring-m...
News copyright owned by their original publishers | Copyright © 2004 - 2024 Zicos / 440Network
Current Date
Apr, Fri 26 - 15:07 CEST