Stu in the comments thread pointed me in the direction of Design By Contract in C, which points out the disadvantages of assert() or require() style of coding and offers an alternative. Have a read of the article, and then download the latest version, if you're interested.
Now, before I adopt this, I just have to persuade any other Angband variant that I'm likely to steal code from to adopt this standard as well...
...and, based on past behaviour, I think this is more likely to bite me than you :)
ReplyDeleteWhat? Unstated assumptions? Undocumented features? I don't think Design by Contract supports those...
ReplyDelete