I have both 9mm and .45 ACP and like them both, though my EDC is a .45 ACP, as I just shoot it better than any other handgun cartridge. .40 doesn't do it for me and I'm not interested, but I'd be the first to say if .40 is what you shoot best, then that's likely what you should carry. All 3 are proper primary defensive carry cartridges, all 3 are quite accurate at defensive distances.
Join the NRA/ILA
I am the weapon; my gun is a tool. It's regrettable that with some people those descriptors are reversed.