assert should only be used for debugging, and only for things that should never happen. side effects on assert is a no-no. (Also in C)