4 ms·
I have always used asserts to enforce invariants (sometimes not just actual "assert" but things like `Preconditions` in Java which are always enabled). Those wi
by brabel 3y ago
I have always used asserts to enforce invariants (sometimes not just actual "assert" but things like `Preconditions` in Java which are always enabled). Those will actually break during testing if they ever change.
I understand you cannot assert all invariants, but as far as I can see, that's your main tool against this problem.
- perlgeek 3y agoAnd those that you cannot assert, you can still document, which will make debugging easier.