DEV Community

Discussion on: In Defense of Defensive Programming

Collapse
 
zilti_500 profile image
Daniel Ziltener

fyi, a function checking its inputs before processing (and potentially its outputs before returning them), those checks are called contracts.

And user inputs... yea, that's not "defensive programming", that's just common sense to check them

Collapse
 
bytebodger profile image
Adam Nathaniel Davis

Totally agree!