I had and carried a Glock 22 as a duty weapon for about 3 months. I HATED it. I had a series of problems with it ranging from light hits on the primer to stove pipes. Sold it, got a Ruger P94....good solid gun....but then got issued a Sig 229. Holy cow....like a beam of enlightenment from heaven. Bought 2 personal ones.
I am a BIGTIME .40 fan...but Glock simply does not make a solid .40 in my opinion. Unsupported chambers in a cartridge with that much pressure just seems like a bad idea. In .45...no problems....in 9mm....you're golden, but in .40? No go.
If you like polymer and .40s, the best I've seen is a Sig Pro 2340 with a Springfield XD being a fair distant second right alongside an H&K. H&K is just WAY over priced with a somewhat crap trigger for such an expensive weapon.
The best .40 hands down is a 229 Sig. For target shooting a .40 CZ75 B in SA or DA/SA is the best.
I have owned all the above except the H&K, which I have fired, and that is the sum of a few thousand dollars "research".
Glock 22 = Bad, problematic, ammo picky but accurate. Not a good SD gun.
Ruger P94 = takes a few hundred to work the kinks out and afterwards is solid as stone. Not terribly accurate but not terribly expensive. Good SD gun.
CZ75B = Most accurate .40...very much like the Sigs...accuracy probably had more to do with weight, bore axis, grip angle and barrel length. Excellent reliability......HEAVY for CC. Good SD gun otherwise.
Sig 229 = As accurate as the CZ if you learn to control it. Medium weight 100% reliable. A bit expensive. Best SD gun for me.
Sig 2340 = Same as Sig 229 with a little more muzzle flip due to top heavy nature of it, better to pack around by about 3 to 4 oz.
Glock 23 = Terrible hand fit. Didn't buy it but was reliable for 25 or so rounds. Still ammo picky I bet.
H&K = Expensive, heavy, accurate, not so great trigger. If ya' got the dough to blow go for it, but there are WAY better values.
XD = Reliable, good warranty, accurate enough about like the Ruger, maybe a little better. Medium weight, great value. I like the trigger.
Hope that helps.