The problem with that is weapons (especially guns) are illegal for the majority of people in many parts of the world.If self-defense is the main objective I think learning how to use a weapon would be a way more efficient use of your time as well as just more effective.
Also guns are not so useful if you are too close to someone because they can hit you before you have a chance to grab your gun and pull the trigger. Knives are better for ultra close range.
Also there are certain places (nightclubs, shopping centres etc) where they do not allow people to enter with weapons.
Also there is the legal concept of excessive force. Oftentimes if you get in an altercation with an unarmed person and you use a weapon you can end up doing jail time for excessive force, etc.
Guns and other weapons are good but they also have their limitations. If you own a gun I would still recommend learning a martial art (or multiple) in addition. Different tools for different situations.