Get the latest tech news
Memory safety without lifetime parameters
This proposal describes the implementation of a memory-safe reference type that does not use lifetime annotations. The goal of the proposal is to: “Safe C++”[safecpp] introduced a comprehensive design for compile-time memory safety in C++.
With a desire to simplify, you may suggest “rather than adding a new safe reference type, just enforce exclusivity on lvalue- and rvalue-references when compiled under the[safety] feature.” But that makes the soundness problem worse. This increases complexity for the compiler implementation and puts a mental burden on the authors of unsafe code to properly uphold the invariants assumed by safe references. If the C++ community rejects this robust safety solution on the grounds of slightly inconvenient lifetime annotations, and allows C++ to limp forward as a memory-unsafe language, can it still claim to care about software quality?
Or read this on Hacker News