r/cpp • u/Specific-Housing905 • Feb 26 '26
The Joy of C++26 Contracts - Myths, Misconceptions & Defensive Programming - Herb Sutter
https://www.youtube.com/watch?v=oitYvDe4nps&t=1s
72
Upvotes
r/cpp • u/Specific-Housing905 • Feb 26 '26
View all comments
Show parent comment
14
u/James20k P2005R0 Feb 26 '26
The issue isn't that its a language feature, its that contracts have many downsides over using a macro. If it isn't better than the thing it replaces, it won't replace it in many codebases and we'll be stuck in macro-land with another vestigial feature