Glorious, and the Battle off Samar.During WWII, there was only one gunfight between battleships and an aircraft carrier. If the HMS Glorious had flown combat air patrols, that gunfight may not have taken place.
But even two major screwups like these don't make for a compelling argument to equip carriers with heavy guns.
How much more expensive would those escort carriers be if they had the guns and armor to defend against a surface task force with heavy cruisers and the friggin' Yamato?