Gun in the cockpit? IMHO, it's just another reason for the terrorists to get in there.
Western pilots are not trained to suck up sacrifices like downed FA's or pax. If they were to stay ignorant an cold / calm (with bullet proof doors of course) then it would be a lot harder for the terrorists to get into the cockpit and take control of a plane. We have just seen that a loss of even a jumbo load of pax cannot be compared to the loss of lives if this jumbo was used in ramming a skyscraper. If even killing all the pax and FA's would not secure the control of a plane to the hijackers then they woud think twice about committing such a crime in the first place since they always want to secure a crazy result for themselves and playing themselves into the hands of authorities isn't certainly one of them if a plane lands safely.