This read goes over a variety of F-35 gun concerns.
A similar situation occurred during Iraqi Freedom in the winter of 2005. Captain Jon Vargas, a F-16 pilot with the 555th Fighter Squadron, used his gun to attack a moving vehicle loaded down with insurgents who were fleeing the scene of a brutal attack on Iraqi civilians. Because of the proximity of civilian structures/personnel and the target was moving at a reasonable rate of speed, the gun was the only option Captain Vargas had.47 The attack disabled the vehicle, killed the insurgents inside, and caused no collateral damage.48 In fact, during OIF and OEF the number of air-to-ground strafe attacks by US aircraft has increased significantly. For example, during a four month period in the winter of 2005, the 555th Fighter Squadron expended over 3,500 rounds of 20 mm High Explosive Incendiary (HEI) on ground targets in the Iraqi theater of Operations.
For an aircraft that can carry over 500 rounds of ammunition and can sustain a rate of fire of approximately 100 rounds per second that may not seem like very many employment opportunities. However, several things must be kept in mind. First, this data represents only one fighter squadron and only during a four-month period of time. During this same period of time, there were at least four USAF fighter squadrons operating within the Iraqi Theater of Operations and all of them were employing the gun with approximately the same frequency. Second, every gun employment opportunity.
-The gun, on the other hand, is a precision weapons that can be used in very close proximity to friendly forces, protected structures and non-combatants.
-When anything is carried outside of the internal bays, it increases the aircrafts RCS making it more vulnerable to Surface to Air Missile (SAM) systems and other aircraft. Although engineers as Lockheed and General Dynamics are confident they can design a low RCS gun pod, many people within the USAF are unconvinced. In fact, as of this writing, no advancements have been made that would make the gun pod’s RCS insignificant.
-HMD vs HUD gun accuracy/dispersion. Also, concerns over F-35 gun-pod accuracy based on failed F-16 gun-pod experience.
-Small number of rounds for both F-35 gun systems. For example, an F-16 carries 510 rounds.
-Gun pod creates need for additional logistics resources for deployment.
-Gun pod parasitic drag.
-The point is that you don’t know when you will need the gun system and planning to only carry it “when its needed” is not practical.
And from another source: how many available gun pods?
UPDATE-- as a comparison. A-10 saves troops lives