The thing is, so is a spatha or similar longsword. In a dense formation the infantryman won't have enough room to swing the sword very effectively so he'll be relegated primarily to stabbing motions. To be sure, the spatha is far more wieldy in close quarters than a spear, but a shortsword is...