While I certainly feel running away is the best course of action, it doesn't always work. If an attacker has you pinned as their target, they will follow right behind you. I stand by carrying my firearm, and I'm fully aware of the legal aspect of use of force. Find yourself in a situation where you are pinned as a target, where the attacker will go to any lengths to get/do what he/she wants, then tell me simply throwing a heal is going to ward them off. I beg to differ.
Furthermore, not finding yourself in dangerous situations can only be achieved somewhat. Sure, there are more dangerous areas than others, but crime can occur anywhere at anytime by anyone. Never assume you are safe, because you aren't. Always staying aware and using common sense surely are important, but I can promise you it will not be the reason you are never attacked.