Want a dog that is afraid or uncomfortable and doesn't tell anyone? No one wants that.
If you punish your dog when he growls, snaps or bites, you are risking that happening. Signals are a good thing. Let me repeat that in another way. When a dog growls at me, my first thought is, "Thanks for telling me you are uncomfortable, now I know what to work on!"
The most dangerous dog is the dog that doesn't give signals, and gives a damaging bite. If you shout, jerk, shock, hit or choke a dog when he is aggressive, he might not tell you when he is anxious. He might be able to take the situation for a while. He might be able to control himself when the toddler toddles by, or the bicycle rolls by, or the jogger runs by, or the guest approaches. But, since he is afraid to tell anyone that he is actually uncomfortable, his bite might "seem to come out of nowhere". When in actuality, he was uncomfortable over the course of many interactions and finally could not take it anymore.
Punishment is in the eye of the receiver. I have seen dogs that run away, tuck their tails and urinate in fear when someone raises their voice. For that dog, that interaction is an extreme punishment. That example illustrates one reason why I am against physical punishment of dogs. You can't tell when a punishment is too much. Besides the fundamental belief that is simply wrong, there are many other quantifiable reasons why it is risky and is unnecessary.
The better approach for any undesired behavior is desensitization. If a dog is afraid, doesn't work to say, "Don't be afraid!" It might seem to work if you punish your dog in essence saying, "Don't be afraid or I will hurt you!" But, as the dog seems to be "ok" you probably haven't done anything to the root cause of the anxiety. For instance, the child might still cause anxiety. The child comes too close, and that might be too much, resulting in a bite.
Desensitization occurs when you introduce a stimulus or trigger at a level that does not cause anxiety. If you slowly increase the intensity of the trigger via speed, distance, noise or movement, then eventually the dog can learn that the trigger does not indicate a threat. If you combine that event with a yummy treat in the process, that is an easy way to create a positive association.
I am currently writing a book on using desensitization for treating aggression. It will be awhile before it is finished, but let me know if you have questions or comments in the meantime.