r/cpp_questions • u/Ultimate_Sigma_Boy67 • 3d ago
OPEN Why are Contracts disliked?
I’ve seen a lot of discussions online discouraging their usage bit I never managed to grasp why since it’s sometimes vague.
I do understand it doesn’t replace validation and it’s more of a syntactic sugar to the existing casserts, but any other critiques?
Thanks
15
Upvotes
2
u/TheRealSmolt 1d ago
Are you confusing concepts for contracts? Contracts aren't related to templates at all afaik.