To use a quote from the movie Full Metal Jacket.. "I'm a life taker and a heart breaker".
In the case of your pistol it goes like this..."I'm a life taker and a Wrist breaker"...
But seriously... to answer the original post.. why settle for either 9 or 40..?? Why not shoot both..?? I shoot both, and they are both fine handgun calibers, and if we're talking Glock or M&P pistols, get the .40 and buy a conversion barrel and some 9mm magazines and in most cases you're good to go. Just a suggestion.
Basically 9mm. More capacity, less wear on the gun, easier recoil, cheaper, similar ballistic performance. However, a .40 let's you shoot 40, 357 sig, and 9mm with just barrel swaps....so it's got that going for it.