I have to disagree with this
My dad has physically punished our dog before, like spanking and stuff, yet she basically worships him and lays in her bed and sulks when he leaves in the morning to go to work. Dogs by nature aren't a bunch of pussies. They can take rough stuff, and the best way to get a dog to do what you want is to establish yourself as the pack leader, like my dad has.
I'm talking harsher than spankings. I've met an owner who literally grabs their chihuahuas collar and yanks it hard, choking the dog.
There's a difference punishing a dog and beating a dog.
A slap on the rump or a clip on the snout is perfectly fine when a dog is misbehaving. But the action has to be done at the time of incident. You can't come home to find the dog has knocked over a vase, and then hit it. It won't know what it's done wrong.
Choking a dog is certainly not an acceptable way to punish a dog. If that's the way someone tries to control their dog then clearly they don't have proper control of them.
Cheese is right in that for the most part asserting dominance as pack leader does most of your job. The best way to avoid even having to punish your dog is to train it right, and that includes setting boundaries for it. Routine is the best way for this. Setting a routine, whether it's regarding dinner, walks, mornings or bedtime, and then sticking to it, keeps a dog in line. And then use of a controlling voice, and hand gestures sets in stone that you're in charge, you're top dog, and you're the one who is in control.
Occasionally you might have to come back to giving the dog a little clip, or squrting a spray bottle.
It's not bad to give your dog a light hit (in much the same way that it's not bad to give a child a slap on the bottom if misbehaving), but you should never be abusing your dog, making them cry out or choking.
And dogs are affectionate and loyal. A dog will still love you forever, even if you do give him a smack when he misbehaves. Dogs still care for their owners when they're severely abused and mistreated. You're not going to make a dog hate you by punishing it.