This one is a very hot topic for most handgun users.
First let me clarify that I'm a Glock user, used to EDC a G17 and a G26 as back up. Relied on them during two gunfights in 97 and 00. The main reason why I use Glock is because they work for me, I don't even like their aesthetics or finishing, but they are a fine tool. With this I'm telling that even though I'm a heavy user I'm not a Glock maniac.
Talking about the 40, I still have several reserves with this caliber. It pushed most of the pistols to it's limits, remember that a great majority of the 40 caliber pistols are built on 9mm platforms, and the pressure generated by the 40 is huge. Also I have witness, not been told, at least five incidents with Glock pistols chambered for the 40S&W round.
So my suggestion, if it worth for anything is to keep with 9mm or 45acp and also consider other handguns, the world does not begin and ends with Glock. Again, nothing against them, just being realistic.
Regards