Here's my thought: We could do the complex interplay of ranged having first go only if knocked and ready, and then reach weapons, and so on. Barring that -- and assuming the combat is a hesitant skirmish* where everyone is jockeying for position or tentatively feinting and pulling back when the don't see an opening -- the person who will act first is the one who successfully determines that now is actually the right** time to move forward. That would be a function of battlefield experience, most likely represented by level (or base to-hit***, if you want to advantage the martial classes).
*in a tunnel fighting scrap where everyone is already in melee right nownownow and the best tactic is to just swing as fast as you can, this might be lessoned.
**right time for creatures who do not fear their enemy's blow can be a problem, and if the D&D characters gamistly know they can survive max damage from their enemy's strike, this could alter things (and berserking creatures as well).
***for 5e, I guess proficiency bonus and then need to give additional pluses to the classes one feels should be going first.