During Vietnam war, guess what US did with F-4 Phantom..?? They took the gun out of it and the poor F-4 jocks suffered so many kills against Nam fighters…you are in trouble when you have no gun, and you're missiles don't work!!! Ever since then, no fighter designer ever dared to design a fighter without a gun…SU-30 MKI, F-22 Raptor and even F-35 all carry guns….just in case they end up in close combat..
Although personally I would regard a close combat fight on a 5th generation fighter as bad piloting technique because one should never let a situation arise where you end up in a close fight but in the fog of war, anything can happen …And once in close aircombat, then the same old throttle-stick techniques kick in and it could be anybody’s ball game….imagine a $ 1 million F-7 shooting down a $300 million Raptor in close combat with a gun…. Oouch…that will hurt some bosses a lot…