(Maybe) All The Contract Papers
https://a4z.noexcept.dev/blog/2026/05/20/The-Contract-Papers.htmlSome people might say that the upcoming C++ contracts feature is one of the best researched topics in C++. I am not sure I agree, but a lot of work has gone into it.
This is a list of WG21 papers with the word "contract" in the title.
There might be some missing, and there may be a few papers on the list that are not directly related to 'the' Contracts work, but probably not many.
This should provide an overview of the work completed and the discussions that took place. And still take place. I hope this gives you an idea of how much work has been done on the topic.
17
Upvotes
View all comments
Show parent comment
2
u/JuanAG May 22 '26
The asserts i use (https://github.com/jeremy-rifkin/libassert) have not failed me once (i normally dont assert much, i do an if check of what i want since they are not trivial) , for the STL maybe what you say it is true, they arent bullet proof
But i need 100% trust that the checks i do are really done, contracts are not going to give me that and my already solution is doing it so it makes no sense to switch
.
When i started C++ a lot of years ago i had a "standard" coding style, over the years i leaned to a defensive one and rigth now i am on the ultra defensive style, checks are a strong part on that so i cant get rid of them no matter what for an inferior product, my foundations are based on asserts (i call it checks in the code but it is the same) which is exactly what contracts should do, when i enter i do pre checks, do the stuff and before returning i do post checking to make sure the function performed as it should, it had valid data and it returned or is going to return also valid data. This makes really easy to spot when things break. This and TDD makes my code as robust as i can in C++, the only lang where i need this level of "protection" is JS/NodeJS and is a lang i avoid at all cost if i can afford to do that