Get the latest tech news
Contracts for C
C++ seems to finally converge with their contracts proposal, I decided to give it a try and come up with ideas how such a thing would look for C. This is in early stages, not a full proposal yet, a…
I decided to give it a try and come up with ideas how such a thing would look for C. This is in early stages, not a full proposal yet, and still would need implementation by some of the major compilers. An implementation with current tools of that function that takes these conditions into account, but doesn’t reflect them in the declaration part could look as follows defer together with defer_return_value to ease the expression of postconditions typeof to ease the forward declaration of functions with the same prototype abort to have a defined strategy for termination unreachable to express assumptions through control flow inline to place conditions into the vision of every user of a function
Or read this on Hacker News