3 ms·
It'd be nice if the author mentioned the real purpose of assertion statements: *it's meant to catch a programmers' errors (your own, or other people working wit
by Arech 3y ago
It'd be nice if the author mentioned the real purpose of assertion statements: *it's meant to catch a programmers' errors (your own, or other people working with your code). Not a users' errors.* From that stems all assert use-cases and all requirements to it.
- Arech 3y agoand from that - all the reasons to use it. A properly placed assertion statement is the only thing that stays between you and a misery of weeks-long debugging sessions.