I own and shoot both M&Ps and Glocks. They're both ultra-reliable guns. Really can't go wrong with either one.
Both are excellent and reliable pistols. Choose one based on your liking.
I've shot and carried M&P9, M&P40/c. I do 3-gun with Glocks. Both are on par with each other.
I slightly prefer the M&P's because of the nicer slide finish and overall better ergo's.