Longer barrel will induce high muzzle velocity which means
better penetration for kinetic rds and perhaps higher effective
range.
But due to longer barrel , it may has difficulty in traversing the
turret in a closed terrain like in between trees and in narrow
street, for example, Israeli Merkava in narrow street will not able
to traverse it's turret to the rear if suddenly an enemy appear
behind with a RPG.
So there this ungrade for the Merkava specially for urban ops,and
especially for situation above.
You know that Merkava does has a rear door, but now they added in
gun port in there so that an infantry could be stationed there to
guard against enemy from the rear, especailly when it is travelling
in a narrow street .