Java like "assert" statement

The piece of documentation you quote is a great explanation for why the design of the Java assert is problematic: putting code with required side effects into an assert statement is such a common bug source in both C and Java.

And I would claim that the behavior of any sufficiently complex production system can’t be understood well enough to state that assert checks are unuseful.

1 Like