r/cpp • • Oct 24 '24

Why Safety Profiles Failed

https://www.circle-lang.org/draft-profiles.html
182 Upvotes

347 comments sorted by

View all comments

Show parent comment

4

u/RoyAwesome Oct 25 '24

but also doesn't cpp2 add more information and 'viral annotations' to cpp2? cpp2 has in inout out for references, and copy move and forward which basically shows that cpp doesn't have enough information in the language to achieve even the safety that cpp2 is trying to achieve in it's limited set of improvements.

15

u/domiran game engine dev Oct 25 '24

IMO cpp2 is tackling slightly higher-hanging fruit with those keywords. Personally I love the out keyword in C# and I hope C++ gets it, and the others.

4

u/Dooez Oct 25 '24

These annotation are local to the function (thus not viral) and except for `out` correspond directly to the normal cpp function parameter declarations.