From what I've heard, most of the self defence classes teach students to just hand over the money to the mugger and ask the mugger to spare their lives. They say it's not worth fighting for some bucks when it's the matter of your life itself. I kinda incline to agree with them.
Since muggers will be aiming for the money we've, I think it's ok to hand over the wallet and walk away instead of getting cut or shot. As an addendum, if there's someone else with you, like your own family or a friend, that would add more to the safety issue. So, I guess it's always better to just comply with that guy and get the hell putout of that place to safety.