Sunday 21 December 2008

Asserting a Coding Style: An Answer

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...

2 comments:

Nick said...

...and, based on past behaviour, I think this is more likely to bite me than you :)

Andrew Doull said...

What? Unstated assumptions? Undocumented features? I don't think Design by Contract supports those...