I'm a little unsure because of the sentence structure, but swords upgrade in PTW.
But even in Vanilla, which I played for some time, I would still be unlikely to build spears vs. swords. I agree that upgradable swords is nice, but the real challenge in Vanilla is to only build as many swords as you need. Too many and it could be a waste. Frankly, the upgrade path from sword to MDI to Gurilla is pretty weak anyway.
Whether spear, pike or musketman - even rifles IMO - they are just standing around watching the battle. Meanwhile, how much gold have you spent to upgrade a spear into a Mech Infantry?
I'm not saying a handful of defenders aren't nice to have, especially at the Infantry stages. But really, if you are fighting an offensive war (even defensively), then your 'defenders' rarely see meaningful action anyway (as Ataxerxes mentioned).
Granted; I had forgotten whether swords upgraded in PTW or C3C. Thanks for the correction.
I guess I just don't build enough military. My need for defenders springs from two experiences, and based on your comments, and those of others, I should use other means to correct these problems.
1) Early war counterattacks by the AI. I've been expanding thru the REX phase, and I don't have that many productive cities just yet. Still growing, not many shields per turn. I build an invasion force, and take a couple cities from my neighbor. The AI then sends a couple of horsemen galloping into my territory (we're neighbors, right?) and threatens my towns. My previous solution: build some spears so that I don't have to reconquer my own city. Better solution: build more swords, or horsemen, and leave them behind as the home guard. They can either go out and kill the AI counterattackers before they get to my towns, or stay home and use the town's defensive bonus to survive the attack.
2) Pesky naval invasions by the AI. In the middle or industrial ages, some AI will get frisky and drop off a shipload of knights or cavs. Again, I don't want to have to waste turns reconquering my own cities, so I can't leave them undefended. My previous solution: have a single defender, upgraded along the way, to prevent an easy victory. Better solution: leave an offensive unit in the coastal towns, rather than a defender. Keep a squad (say, 3-5) of mounted units in the homeland, ready to use the roads/rails to pounce on the invaders.
Added benefit, as several of you have pointed out -- building all offensive units will bias the AI's assessment of my relative strength, and may delay or deter some of their invasions.