Depends on the way you look at it, I suppose. I don't think the Vietnam example, as frequently as it's brought up, is as valid as it once was. In an age of cooperative engagement, extremely high performance air-to-air missiles/systems, and increasingly miniaturised ground attack munitions, I think a case can be made that an internal gun isn't going to see nearly as much use as in past eras. Certainly as far as air to air combat goes, when you've got helmet-mounted sights, high off-boresight IR missiles, AWACS support and far more effective BVR sensor and weapon systems, I'd have to think the gun would be a weapon of absolute last resort. Sure, if you're out of missiles it'd be good to have, but again, when you've got off-board sensors and you're operating as part of a networked group of aircraft, you have to consider that even if you don't have a shot, it's very possible someone else will. If the target has LO properties that are confounding your missiles then maybe, but then I do wonder how much more luck the gun's targeting system will have with the hostile anyway... gotta aim it with something, after all.
When it comes to air to ground, once again I think it's becoming more of a nice to have rather than a necessity. The smaller precision guided munitions get, the more can be carried, and delivering these weapons is not only more accurate than strafing runs (although I'm sure modern aircraft are by no means slouches in that area), but safer for both friendlies on the ground and for the aircraft itself, which should be able to deliver these munitions at a higher altitude and thus it's more likely to be outside the engagement envelope of AAA/trashfire/VSHORAD missiles. Looking at some of the smaller weapons, starting from the SBD on down to laser-guided 70mm rockets, the Griffon missile, the Viper Strike glide bomb, there's all kinds of bits and pieces available for low-collateral ground attack.
I've always erred on the side of caution and considered a gun to be something I'd rather an aircraft have and not need than need and not have, but with ongoing advances in technology I'd say it's very much more of an optional extra than it once was. I mean how long were the Harriers operating in Afghanistan without guns... they seemed to do alright... and from a fighter vs fighter perspective I don't know when was the last time guns were a deciding factor in an engagement (wouldn't surprise me if it was the Israelis, they've got quite a history of effective air-to-air gunnery).
Does the proliferation of LO technologies change the equation? Possibly. It certainly opens the potential for aircraft to have more close encounters with one another. But again, on that kind of high-technology battlefield I don't know if guns would play a major part in the overall outcome of the air war.
Anyway, I'm rambling, apologies