Case in point....The US Navy's Gearing class destroyer was in service from 1944 to 1984(all the way to 2005 in the taiwanese navy!). The Spruance class destroyer was in service from 1975 to 2005.
It's also case in the point that politics matter more than technology on such things.
The
Gearing class was never meant to be upgraded - it was built solely for WWII combat, without provisions for swapping of weapon or sensor suites. Still, it ended up getting a couple of FRAM treatments plus whatever the Taiwanese and Mexicans and so forth did with their respective ships afterwards, and serving a decade longer than the
Spruance, which
was designed primarily with constant upgrades in mind.
There'd be nothing wrong as such in still using
Gearings for sub-hunting today, or for coastal bombardment and interdiction duties. Structurally, they might still have some life left, and their machinery would be relatively simple to refurbish or replace. The limiting factor is that they can't be fitted with modern, very bulky anti-aircraft weapons and sensors to the level that an oceangoing subhunter or a littoral sentinel now needs. I guess something similar would have been a big factor in dooming the tiny
Constitutions, too: perhaps ships that small couldn't receive modern strip phasers, and thus couldn't get frontline roles, except in desperate moments - for which Starfleet preferred to stockpile just one obsolete midget design, in this case the
Miranda.
Timo Saloniemi