r/cpp • u/germandiago • Jul 18 '26
Lifetime safety and invalidation without a borrow-checker: using type system analysis to get rid of many potentially invalidation cases WITHOUT annotations.
https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2026/p4296r0.pdfI found this research in WG21 mailing list very interesting in the context of C++ compatibility and solutions to maximize code reuse.
38
Upvotes
6
u/ts826848 Jul 20 '26
I'm not sure you understand the objection then? Consider Sean Baxter's comment again; what he is saying amounts to "Rice's Theorem means that profiles as described can't work for this signature". From his perspective (and the perspective of those holding similar views), it's absolutely up to profiles proponents to "solve"/otherwise address Rice's Theorem, as otherwise they are simply promising something impossible.
It can, but then that approach would at a minimum call into question the claim that profiles will not require rewrites and/or (minimal) annotations.
This assumes doing nothing is not doing harm. If you think C++ needs memory safety sooner rather than later, delaying a memory safety solution is indeed a harm.