Depends which historical period we are taking our guns from. For a long period of time guns and swords existed simultaneously on the battle field until firearm technology advanced to the point to completely displace melee weapons.