There are certainly times when parents/carers need to control children when they are out of control and safety is an issue, but you cannot teach acceptable social behaviour through fear-based punishments. In fact, fear-based punishments(corporal punishment) actually escalate the problem behaviour of those on the spectrum by increasing their anxiety.
The term ‘discipline’ has unfortunately come to be equated with direct and aversive punishment. e.g. Angry reprimands, spanking, etc applied when a child is considered “naughty” or “badly behaved”. Discipline should in fact be the positive social education of a child(be they on the autism spectrum or otherwise) involving teaching and guiding children to behave and co-operate in a manner that allows them to manage in the world of people.
Basically every social interaction between your child and those they may meet, is an opportunity to discipline your child in a positive manner. If you attend to your child when he misbehaves, you are actually inadvertently training him to misbehave. It’s important to note when your child is behaving well(even if it’s simply sitting and waiting patiently for a few seconds). Praising them then and there, giving brief attention at those times, will increase the times they are behaving well. It is this simple.