r/cpp
•
u/steveklabnik1
•
Oct 24 '24
•
1
Why Safety Profiles Failed
https://www.circle-lang.org/draft-profiles.html
180
Upvotes
View all comments
5
u/duneroadrunner Oct 25 '24
I'll just point out that this demonstration that the stated premises of the "profiles" cannot result in a safe and practical subset of C++ doesn't apply to the scpptool approach. Regarding the three listed necessary types of information that cannot (always) be automatically inferred from "regular" C++ code:
The scpptool approach sides with the Circle extensions on points 2 and 3. That is, scpptool supports lifetime annotations and does not support the use (or implementation) of potentially unsafe functions without an explicit annotation of the "unsafeness".
Regarding point 1, the scpptool approach concurs on the need to be able to assume that certain mutable aliasing does not occur. But it diverges with the Circle extensions in that it doesn't require the prohibition of all mutable aliasing. Just the small minority of mutable aliasing that affects lifetime safety.
(off-topic: It does almost feel like these safety posts need their own subreddit. I'm they'll slow down once we agree on a solution any day now, right? :)