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
Show parent comment
21
u/ts826848 Oct 25 '24 edited Oct 25 '24
Whether a given approach is incremental (or how incremental it can be made) is a completely orthogonal line of questioning to the comments you were complaining about and the comments I was attempting to clarify. Those comments are claiming something fairly straightforwards: "Profiles promise lifetime safety but do not appear to be able to correctly determine lifetimes for these common constructs, so it's unclear how profiles can fulfill what they promise."
And even then, your question is a bit of a non-sequitur. What the comments you're complaining about are claiming is that the profiles lifetime analysis doesn't work. If their claims are correct, as far as lifetime safety goes you supposedly have a choice between:
Is it better to incrementally apply an (potentially?) untrustworthy analysis? I don't think the answer is clear, especially without much data.
Edit in response to your edit:
The problem is whether the analysis described by profiles is sound and/or reliable. If it's unsound/unreliable enough, or if it can't actually fulfill what it promises, then you won't be able to rely on it to incrementally improve old code without substantial rewrites, and you won't be able to ensure new code is actually safe - in other words, the whole world would practically still be unsafe!
That's one of the big things holding profiles back, from the comments I've seen - hard evidence that it can actually deliver on its promises. If you assume that its analysis is sound and that it can achieve safety without substantial rewrites, then it looks promising. But if it's adopted and it turns out that that assumption was wrong? Chances are that'll be quite a painful mistake.