I said "spanking", not "beating".
Both spanking and prison are corrective measures. Spanking doesn't harm the child so long as the administrator of discipline doesn't intend to cause damage. My parents spanked me while growing up, and I am a much better person than I would be otherwise.