DEV Community

Discussion on: Is “Defensive Programming” actually healthy?

Collapse
 
vladimirpavelka profile image
Vladi Pavelka • Edited

I would argue you are using the term "defensive programming" wrongly. To me it's "offensive programming"/"fail-fast", what's described here. The original version - continue running in the else branch a flawed process and pretend everything is fine, if (null) return null, etc is the defensive programming trademark