....mookiemookie.
It depends on how realistic you want to play. After reading a couple of books on the sub Pacific war I tend to play the game as it was "played" in real life which means duking it out with a DD is suicidal (and with TM it still basically is, LOL). The sub's objective was to disrupt the Japanese war effort, best achieved by hitting the supply/merchant ships etc, taking on warships was secondary to that unless given specific orders to engage a TF etc.
As mookiemookie implied, winning a "gun battle" vs a DD is exploiting the weaknesses of the game as opposed to reflecting historical reality. Ultimately it boils down to what you enjoy out of the game.