We must remember the Final Outcome of the deck gun question for ALL navies...submarines are meant to be stealthy! Guns might be cool, but it's best to DIVE!
The Germans went CRAZY with deck guns (ship and flak), and even the Yanks increased from 3" to 5", and tho most US boats had an aft gun for fighting while running, some added a SECOND Forward gun!
BUT..in the 50s, the Yanks went to NO guns, and even in the end of WWII the Germans dropped guns.