You’re confusing the Romans with the Greeks. The Romans didn’t use the phalanx. the Greeks [and later the Macedonians] did. The Romans used the triplex acies and the maniuplar/cohort formation [much more maneuverability]. and before the gladii came out, they softened you up with the pilae [javelins].
The difference? Cynochepalis, where the Romans destroyed the phalanx army of Philip VI of Macedon, and acquired Greece.
Most casual readers know ancient formation of spearmen/infanty by the more widely known generic name of phalanx.
From Wikipedia: “Many spear-armed troops historically fought in what might be termed phalanx-like formations. The word has come into use in common English to describe “a group of people standing, or moving forward closely together”;[2] c.f. “a phalanx of police”.[3]”
However, I take your point. :-)