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
2
u/germandiago Oct 26 '24
Yes. I know I am proposing "the same" partly.
But the semantics split, if you isolate it to safe analysis, without changing the language syntax, can be reused.
And that is a key point for reusability.
I never ever complained about part of the semantics of Safe C++.
I complained mainly about the fact that the syntax will break everything and will make two different languages.
If you can change the semantics to be somewhat more restrictive, you could break code that aliases at compile-time only. This is key: a more restrictive analysis can detect unsafety but will play basically well. Think of it in terms of compatibility: if you had to relax rules, it would not be ok. But if you have to strengthen them, there is no problem except that it will detect some uses as unsafe and those can be dealt with.
Retrofitting that analysis into the current language when doing safety analysis is key to be able to analyze existing code.
The problem of reference escaping remains and it must be dealt with in some way.