3 ms·
Honestly, my first question was "why not use a combination of user-created types and exceptions to ensure program validity." But I get the impression that asser
by kr0bat 3y ago
Honestly, my first question was "why not use a combination of user-created types and exceptions to ensure program validity." But I get the impression that asserts are used for alerting programmers to their own syntactical and logical errors; unlike exceptions, which can occur in logically proper code.
- diarrhea 3y agoExactly. Assertions are for programmers and their internal work. Exceptions for the rest, mainly the dynamic, user controlled inputs and their derivatives.