First of all, I understand and accept that spanking children is wrong in any and all cases and should never be employed.
However, there are two cases when I'd tend to excuse spanking and this is one of them. I'd like to know what are better alternatives to handle such situations.
Thank God I'm not a parent, because I think I'd a terrible father, but I still know such situations from personal experience.
When I was a toddler we were living in a tower block, pretty high above ground. It was clear that if I fell out of the window I'd die.
Still, when my godfather came to visit us, he was stupid enough to "show me what was beyond the window". He held me by my legs and let me lean over the window, so that I could see the yard.
Then, a few days after my godfather left, my parents saw me climbing towards the window. Clearly I wanted to do the same, but then there was no one to hold me. My parents reacted immediately by beating me up. I never again tried to crawl out of the window.
I believe that if my parents instead "just" forcefully removed me from the window and sternly forbade me from ever trying this again, I'd just try it again when I thought they were not looking.
Since spanking is unacceptable, what should be employed instead to make absolutely certain that children's extremely dangerous behaviors, such as crawling out of the window, never repeat again, if the children are still too young to understand the dangers?