Those things don't "protect from mistakes". They help you track mistakes down.Quote:
This is what I like. Protect from mistakes.
Read the rest of my post.Quote:
I just want throw in that generally, I like to code for the fool because often it turns out that I AM that fool myself.
There is a difference between so called "defensive programming" and trying to stand between a fool and his intent.
So, no, you aren't that fool. You may be a fool; you just aren't that one.
O_oQuote:
You would not believe the amount of stupid mistakes I've been able to catch early on this way.
I'm positive that the number is between zero and none.
The "defensive programming" tactic doesn't serve to add bug checks beyond what you've already thought to check, and if you've already thought to check for a condition it isn't "early".
I prefer the tactic over other methods myself; I'm not implying some magic elsewhere.
Soma