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
5
u/Dalzhim C++Montréal UG Organizer Oct 26 '24
It's the coloring problem. A
boost::asio::awaitable<T>canco_awaitotherboost:asio::awaitable<T>coroutines, but it can'tco_awaitunrelated coroutines. As forconst, I'm guessing you meant that non-constcan call intoconstrather than the other way around. It's viral in the sense that once you have aconstfunction, you can only call otherconstfunctions unless you use the escape hatch:const_castto cast awayconst.The thing is: statically expressing a transitive property that requires local reasoning is bound to be viral to a certain degree.