For clarity, let me begin by saying that spanking has as many definitions as there are people would will talk about it. So, as a caveat, I can only speak from my own definition, which is an open-handed smack, administered with a bare hand, to a bottom. No paddles, implements, or other enhancements, and no striking anywhere else.
I have two children who are now teenagers, may the gods look kindly on me. Spanking was not a routine form of punishment, but I have spanked and do not regret it. While my children lived in dread of being on the receiving end of one of my lectures, when they each ran out into the street as toddlers, it was a particularly lousy moment for a lecture. It was a brilliant moment for me to catch the speedy little offender, administer one open-handed swat to the well padded bottom of the offender and yell, "NO!" quite emphatically. The little miscreant burst into tears because I did not normally scream or spank. It was a stupendously effective attention-getter, and neither of them ran into the street more than once.
If used sparingly, it's discipline.