4 ms·
This is why an API should always have an "assertions": true option. Why should normal function calls have assertion/invariant checks, and not API calls?
by amelius 1y ago
This is why an API should always have an
"assertions": true
option. Why should normal function calls have assertion/invariant checks, and not API calls?
- porridgeraisin 1y agoThis idea looks good. Have you used it in practice? Can you share how?
- amelius 1y agoYes, you basically use the option whenever you have assertions turned on in your code. Then the service running the API will do extra checking when the assertions option is true, basically making it less forgiving and following the specification closely.