The problem with a phalanx is that it's hard to turn, not that attacking from short range is somehow better than attacking from long range.
I did. It's right there in my comment.
I'm supporting the idea that a spear is superior in any defensive position by pointing out that the problem with an offensive block of spears is the need to move, which doesn't apply to defense.
The problem with a phalanx is that it's hard to turn, not that attacking from short range is somehow better than attacking from long range.