The C++ Alliance promotes memory safety mechanisms in C++, tested in Rust.

The president of the C++ Alliance has announced the work on a specification that adds extensions for safe memory handling in the C++ language, reminiscent of features implemented in Rust. For this project, Sean Baxter, the author of the experimental C++ compiler Circle, which develops ideas to enhance C++ code safety without using garbage collection, has been involved. As part of the project, Sean published a document analyzing the applicability of various protective measures proposed in Rust, evaluating their implementation for C++, and suggesting enhancements to the C++ language to improve code safety.

It is noted that the initiative has been launched in response to the growing demand among developers for safe programming methods and aims to integrate new features into C++ that can protect against common memory-related errors, such as accessing freed memory and buffer overflows. The enhancements are being developed as options that will allow gradual migration of projects to safer practices while maintaining compatibility with existing 'unsafe' code.

Memory safety is proposed to be ensured through mechanisms implemented at the compilation stage that do not incur the additional overhead typical of languages that use garbage collectors. The main proposed safety methods include tracking ownership of objects, variable borrowing checks (borrow checker), the use of a safe context, and the creation of std2::send and std2::sync interfaces. The work also covers the creation of a safe version of the standard library that offers implementations of algorithms and data structures for safe memory operations.

Source: opennet.ru

Buy reliable website hosting with DDoS protection, VPS VDS servers 🔥 Buy reliable website hosting with DDoS protection, VPS VDS servers | ProHoster