In my Julii campaign, Hastati (and later Principes) are the core of my army. I mean, what else have you got? Triarii come too late - the Marian reforms preceded them in my campaign - and town watch are not really frontline troops.

I do use velites (later archers), equites and (to my shame) wardogs, but I prefer to have these as support troops for my solid heavy infantry line as this feels more historical. The velites and archers shoot from the front, then scoot behind the heavy infantry. The equites come out from the flanks. The wardogs... well, let's skip the cheese.

I think the key thing is to put the Hastati and Principes on fire at will. When stationary and defending, they should - just about - get a volley off before infantry closes. Cavalry attacking them will not be pretty, but usually you have the numbers for them to prevail. Even attacking, I tend to park them just in range and let them fire unless it is an emergency. The pila do decent damage and are particularly valuable against armoured enemies where every single casualty counts (eg heavy cavalry, chariots and elephants). I do tend to forgo the charge bonus unless out of ammo or in an emergency, but I think it is a reasonable trade off given that the bonus is rather low (a mere +2, IIRC).

I am not very experienced, but surely the hastati compare favourably to most other factions early infantry? At least they have good defence and the pila. I think a Roman army with lots of heavy infantry and some support should be able to handle most AI armies. The post-Marian units seem to do the same job, just better.