I don't understand what's the point of assertions? Shouldn't unexpected cases be treated with proper error handling?
Name:
Anonymous2011-08-16 11:55
The practice of assert()ing things come mostly from C. As I personally stated elsewhere (thread already dead), C is a brain-crippled language. Don't use it: they tend to persist and create bad habits. In C, you ought to preprocess with NDEBUG if you do use, but no one really compiles with that definition.
There are languages which create more interesting assertion mechanisms (throwing an exception for example). These are much saner and safe to use, maybe even in production code.