A gun will get you in trouble in your home, on an airplane, and especially in the street. If you don't get shot yourself, just add an extra 25 years to your sentence for using a firearm in commission of whatever felony the end up getting you on. While you wouldn't want to bring a knife to a gun fight, a knife may be a better choice for personal protection. Because at least you don't have to worry about incurring firearms violations, yet it can be just as deadly.
RE: "A [pistol] will get you in trouble in [edited] an airplane, and especially in the street"
True on airplane, legally. On streets, well, depends on training and having a CCW Permit (in the USA). At home, assuming stored hidden and locked, a 45ACP pistol on trained hands can save lives, as verbally recommended by couple of Berkeley PD officers.