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
1
u/RoyAwesome Oct 25 '24
If you are embedding the annotations, how would that not be detectable?
some
int&<'a> foo(vec&<T, 'a>, int&<'b>)being changed toint&<'b> foo(vec&<T, 'a>, int& <'b>)would change the annotations that are embedded in the binary, necessitating changing it's mangled name and causing things asking for the old name to get nothing. To not change the mangled name of this function if you make this change seems like either 1) you aren't embedding enough annotations, or 2) you are misrepresenting the contract.Sure, this kind of a change is a problem, but it's not silent to my knowledge. That's very crashy if you aren't expecting it. A well implemented library could return an error in this case and an application can handle it.