History repeating itself
Once again, the military establishment (at least over here in the US) has failed to learn from history and is therefore doomed to repeat it.
Prior to the little excursion into Vietnam, military planners/designers thought the (aircraft) gun obsolete. After all, missiles could do all that from a safe distance, with greater accuracy, blah blah blah.
Reality, as most folks know, turned out to be rather different. Relatively simple and inexpensive MiGs and their cannon were kicking butt at the beginning of the war while complex and expensive missiles failed in that miserable environment. Defense contractors and military planners had to jury rig gun pods onto early model F4 Phantoms. Later edition Phantoms had internally mounted cannon, lessons having been learned the hard way...
If we proceed too far down this path, we are going to lose an even MORE valuable military option than aircraft mounted cannon. Even though properly trained pilots are expensive (and occasionally rather obnoxious in their swagger), they are an essential option in any military equation. Just as you can't win a war without "boots on the ground,"* there will come a day when you can't win a war without a HUMAN in the air.
* before anyone starts, I remind you of the tried and true maxim "conquest is easy, control is not". There are many ways to conquer without boots on the ground, but not control.