Comment by account42
3 days ago
Can you go into why you didn't find them to be useful? Seems if done right they should allow many cases to warn/error at compile time while providing additional information to the optimizer in release builds. Technically with whole-program builds you could get the same with regular assertions in the function implementation but I can see how having them in the function prototype could make things easier in practice.
`assert` turned out to be much more useful.
The only advantage contracts had was with inheritance hierarchies, and I don't use them enough to make it pay off.