Ok i've had enough of people thinking they know metal is about around here. Let me share my 2 cents.
First of all, Metal is about freedom. Freedom to mosh? Yes. So u dun wanna mosh? stand aside. Or adopt mosh-protection measures (stand in front and dun be part of the mosh oso can, dun kick or punch anyone).
Second of all, a lot of metal nowadays are thrash influenced. Being thrash influenced means there is punk influence. Like what ironcross said,
Thrash = Metal + Punk
The degree of punk and metal determines whether its thrash punk or thrash metal. Hence, thrash inherits both dances of heavy metal (headbanging) and punk (slam-dancing).
The idea that metal has no moshing is because in the heydays of Led Zeppelin, when they were considered Heavy Metal, headbanging was the norm. It was just a matter of time as metal got faster and more punk-influenced, moshing would break out. Moshing usually occurs with speedier forms of metal, hence it doesn't matter what type of music actually. Even at emo gigs, when the music speeds up, moshing breaks out, with the emo/screamo kids going into karate mode, literally.
Off course, don't take advantage and punch everyone in sight. Stick to shoving and maybe light punches (do not aim at face) and do not wear sharp objects and wear strong shoes to prevent ur feet from getting trampled.
Certain genres are weird to mosh to like, like classic heavy metal and some say power metal. But i say screw it. If u wanna slam dance even if its black metal, do so. Just make sure u're not the only one doing it and pissing everyone off.
Verdict : Modern metal influenced by Thrash influenced by punk. Punk has moshing. case closed.