Different musical styles are traditionally associated with different club dance styles (and, while they sometimes aren’t separate named styles, solo and partner dancing involve some different skills, too.)
There are transferrable basics (though, unlike computing, the minimum set of prmitives to cover the whole space is quite large), but, I think it would be difficult to pick them up outside of the context of particular styles.