The .40 has it's place, that place just isn't in my safe. In all seriousness, the main advantages that I see the .40 having mainly apply to LE. Many police want something that can through medium to heavy weight bullets (150grn+) at more useful velocities that what the 9mm is capable of in that weight class. This is desired because of superior penetration characteristics in certain materials (auto glass in particular) While cartridges such as the .45ACP and 10mm auto can certainly do this, they require a larger frame and generally don't provide the capacity that is desired without an overly large and often heavy gun. So, the .40 S&W can drive 155-180grn bullets at higher velocities than a 9mm but can fit in a smaller, lighter, higher capacity gun than a .45 or 10mm.
Really, it fills much the same niche that the .357 Magnum used to when revolvers were still the preferred weapon of police. While the .38 Spl came in an easily carried packager, it couldn't drive heavy enough bullets fast enough to meet many LE's needs (back then, not only did it have problems with auto-glass penetration but also reliable expansion at it's relatively sedate velocities due to primative JHP designs). While larger calibers such as .41 Magnum, .44 Magnum, and .45 Colt certainly gave the ballistic performance that LE wanted, These were only commonly available in larger, heavier revolvers than what most cops wanted to carry (also, increased recoil could often be a factor). The .357 Magnum was just right because it could deliver superior ballistics to the .38 Spl, but could do it in a more easily carried gun than the big bores.
Personally, I have no need for a .40S&W because 1) I'm not a cop and 2) I already have other handguns that can do the same thing just as well if not better. If I want a smaller-framed high capacity gun I'd feel fine with my 9mm (a CZ-75) since I'm not likely to have to shoot through barriers such as a windshield. Likewise, if I want a larger gun I'll be fine with either my .45 or 10mm (a S&W 1911 and S&W 1076 respectively) as the larger gun doesn't bother me and I don't feel that I need more than the 9-10 rounds of capacity that these gun provide.
Really, it fills much the same niche that the .357 Magnum used to when revolvers were still the preferred weapon of police. While the .38 Spl came in an easily carried packager, it couldn't drive heavy enough bullets fast enough to meet many LE's needs (back then, not only did it have problems with auto-glass penetration but also reliable expansion at it's relatively sedate velocities due to primative JHP designs). While larger calibers such as .41 Magnum, .44 Magnum, and .45 Colt certainly gave the ballistic performance that LE wanted, These were only commonly available in larger, heavier revolvers than what most cops wanted to carry (also, increased recoil could often be a factor). The .357 Magnum was just right because it could deliver superior ballistics to the .38 Spl, but could do it in a more easily carried gun than the big bores.
Personally, I have no need for a .40S&W because 1) I'm not a cop and 2) I already have other handguns that can do the same thing just as well if not better. If I want a smaller-framed high capacity gun I'd feel fine with my 9mm (a CZ-75) since I'm not likely to have to shoot through barriers such as a windshield. Likewise, if I want a larger gun I'll be fine with either my .45 or 10mm (a S&W 1911 and S&W 1076 respectively) as the larger gun doesn't bother me and I don't feel that I need more than the 9-10 rounds of capacity that these gun provide.