I've owned a G22 and still own an M&P.40
Personally I like the feel of the M&P and I'm much more accurate with it than I ever was with the Glock. To me the G22 feels like you're shooting a .40, whereas the M&P feels more like shooting a 9mm.
Which is better? Well you can find that argument on here all over the place. Glock certainly has the reputation and proven history to back it up. M&P's are new to the market and there seems to be kinks that still need to be ironed out.
However that said I've put thousands of rounds through my M&P and it has been problem free. You get a lifetime warranty, you can replace the backstrap to better fit your hand. IMO the gun feels much more comfortable in hand as opposed to the Glock, although some people don't mind the Glock grip.
Personally the lifetime warranty is what sold me on the M&P, when my mag release started having problems I took full advantage of it. When I started looking for a new carry gun I was going to buy another Glock, but I liked the feel of the M&P and wanted something different. If it didn't come with that warranty however I would have gone with Glock.