Sharing a quick opinion :P

I will agree with many here that both have their merits within their own context.

Basically how I see it is that the Phalanx was the ultimate evolution of Spear Wars, and the Legion/Cohort is part of the Sword Wars.

And as history goes usually, it is all a question of circumstance and fashion. When Alexander the Great did his own feats, then all of the sudden everyone started using the Phalanx. It just so happened that when Rome became the new influential top dog in the neighborhood then everyone forgot about the phalanx.

If we do take a look across History however, it can also be argued that the Phalanx outlived the Cohort, when the Pike became once more in later medieval times a weapon of choice, and units fought in the same fashion up to the 17th century.