There are any number of good answers to the OP's question.
If I were to be faced with some sort of massive armed invasion of my home, one my semiautomatic centerfire rifles or 12-gauge pump would be what I would want in my hand.
However, that's not very likely. What is likely is that you're at home sick from work, someone (or maybe a couple of someones) decides to burglarize your home, you are asleep when they knock on your door with their BS story to see if anyone is home, they break into your home, and there is an unexpected confrontation. This is what has happened with several of my friends and family members. It would have happened to me a couple of times, but I was actually at work instead.
Given the much more likely scenario for home defense, almost any of my many centerfire handguns would be suitable. Any normal service caliber, and probably the magnum sort of ones, would do fine.
I am personally fine with semiautos or revolvers for HD. A person entering your home for a burglary may or may not be armed. Their intent is to burgle, not to be involved in a gunfight. If they see you with a firearm, their proper professional decision is to flee the scene. Your smartest decision is probably to let them. If not, I am confident enough in my skills and training to believe I could take care of things with something like a six-shot 357 magnum.
I would also be comfortable with one of my Glocks or Berettas or CZ's or whatever. I don't shoot them quite as well, but I wouldn't feel bad about having something like a full 15-round magazine, either.
I personally prefer centerfire revolvers to centerfire semiautos for shooting at the range or plinking. None of my centerfire autos is as accurate FOR ME as my best centerfire revolvers. I have some very fine service pistols: Glock 22, Beretta 92 & 96, nice CZ clones, Walther PPQ, S&W M&P, Ruger P-series, Brownings, 1911's, etc. I can shoot them well: I am not a competition quality shooter, but I am better than the vast majority of those I see shooting at the range. However, those service pistols just can't compete FOR ME with my best revolvers: my S&W Model 10 and 28 and 625, my Ruger Blackhawks and Super Blackhawk, my Old-Model Taurus 66 and 689, my Astra Police Model... frankly I shoot even my Charter Arms snubbies about as well as my full-sized service pistols.
So there probably aren't many bad choices for HD. For the range or plinking, I personally believe that nice revolvers are probably better for most people, but that is purely subjective.
However, my belief is that for practice (at the range or plinking), 22lr's are extremely useful. The ammo cost and recoil is squat. They are my most accurate handguns. Unlike centerfire, the semiautos are probably cheaper, easier to find, and probably more accurate. I am a revolver guy, but my Buck Mark and Ruger Standard will outshoot my K22 and 6.5" Single Six on most days. It hurts me to say that. My K22 is a thing of beauty.
If I could only have one handgun, it would be a 4" medium-framed 38 or 357. If I were just starting out, that would probably be my first purchase. A good 22lr would be my second. If someone preferred a semiautomatic service pistol instead of the revolver, that is understandable. Any of the widely-issued ones should work just fine.