Barry's take on Assert

Barry Lapthorn has a response to my Assert is Evil posting where he concludes that assertions aren't needed if you have tests... He also raises a point that I missed which is that the typical assert on Windows machines causes a dialog box to pop up and stop your program giving you the option of debugging it or ignoring the assert, etc. This kind of response is not especially useful if you're writing code that doesn't interact with a user, such as a service, as the code may not be able to show a dialog box ...


Another salvo in the ongoing debate about assertions...

For those of you who didn't spot the link to Mark's latest post, it's here:

Interesting piece, Mark, I'll comment on it tomorrow.

Leave a comment