While I appreciate that you turned this into a positive, I don’t think violence and tough love is something we should promote, celebrate or even tolerate as a society.
Here is a crazy thought: how about we strive to create a space where everyone feels valid as they are, where they feel that have a space where they can contribute, rather than make people feel like they have to toughen up in order to “take charge” or forcefully “making space” for themselves by forcing others to follow their will.
The guy hitting you was not an appropriate response, neither is you possibly disrupting class by cracking jokes. The solution is communication and respect. Getting buff and letting a culture of “boys will be boys” prevail is not.