If the asserts you're talking about mean that the program vomits and then exists, assertions can be very bad. This is not to say that they are always the wrong thing to use, they are a construct that is very easily misused. They also have many better alternatives. Things like that are good candidates for being called evil.
For example, a 3rd party module (or any module really) should almost never exit the calling program. This doesn't give the calling programmer any control over what risk the program should take at that moment. In many cases, data is so important that even saving corrupted data is better than losing that data. Asserts can force you to lose data.
Some alternatives to asserts:
- Using a debugger,
- Console/database/other logging
- Exceptions
- Other types of error handling
Some references:
- http://ftp.gnu.org/old-gnu/Manuals/nana-1.14/html_node/nana_3.html
- http://www.lenholgate.com/blog/2005/09/assert-is-evil.html
- Go doesn't provide assertions and has good reasons why: http://golang.org/doc/faq#assertions
- http://c2.com/cgi/wiki?DoNotUseAssertions
Even people that advocate for assert think they should only be used in development and not in production:
- http://codebetter.com/gregyoung/2007/12/12/asserts-are-not-evil/
- http://www.codeproject.com/Articles/6404/Assert-is-your-friend
- http://parabellumgames.wordpress.com/using-asserts-for-debugging/
This person says that asserts should be used when the module has potentially corrupted data that persists after an exception is thrown: http://www.advogato.org/article/949.html . This is certainly a reasonable point, however, an external module should never prescribe how important corrupted data is to the calling program (by exiting "for" them). The proper way to handle this is by throwing an exception that makes it clear that the program may now be in an inconsistent state. And since good programs mostly consist of modules (with a little glue code in the main executable), asserts are almost always the wrong thing to do.