Originally posted by Ilja Preuss:
I totally disagree. Production applications should fail fast (if they fail at all). http://en.wikipedia.org/wiki/Fail-fast
I agree with the principle of fail-fast, but I don't think Assertions are the right way to do it.
Actually, I generally don't use Assertions at all. But I do aggressively check parameters and throw plenty of IllegalArgumentExceptions and similar as relevant.
My clients will tolerate a nicely formatted error message that we just can't go forward, but they won't put up with an app up and dying, a la Assertions failing.