I own an M&P 40c and full size .45, I also own a G17, G19, and a G22. I must say that I like both guns a lot. I do tend to shoot the Glocks a little better and the trigger feels much better in my opinion...especially the reset. I do like the ambidextrous slide release on the M&P and the palm swell grip system as opposed to the back strap design of the Gen 4 Glocks...but I don't use them on the Glock anyway so it's not a huge deal. I have carried both on duty, but my department has started issuing us the G22, and even though I have the option of carrying a personal, I figure why not use their gun instead of my own.
Overall I don't think one is better than the other. There are little things I like about each of them.
"They're on our right, they're on our left, they're in front of us, they're behind us; they can't get away from us this time."
Chesty Puller, USMC, Chosin Reservoir, Korean War
"You cannot exaggerate about the Marines. They are convinced to the point of arrogance, that they are the most ferocious fighters on earth - and the amusing thing about it is that they are."
- Father Kevin Keaney, 1st MarDiv Chaplain, Korean War