I have seen several people talk about the ergonomics of the M&P, and although I do like them, I don't think the glock suffers from any ergonomic flaws. I have owned an M&P fullsize 9mm as stated previously, but sold it to buy a Glock. I intended to run the M&P as a carry gun and competition gun. Then I got serious about competing in USPSA "production". I wanted something different than the 4.25" barrel. My first plan was to buy the 5" M&P and do a trigger job on it. However I had seen many a Glock run fast and accurate at the local competitions so I decided to try one before I settled on the 5" M&P. Glad I did. I rented a Glock 17 gen 4 at 2A in Tulsa. I shot it very well, it fit like a glove in my hand and was very easy to shoot accurately. At that moment I decided to run the Glock. Everyone says rent them before you decide and I couldn't agree more. It may even change some poorly conceived notions you have toward a gun or manufacturer. I was not a Glock fanboy by any means and had shot them in the past. Giving them one more try after learning and growing as a shooter I decided they were the best fit for me. I am not telling anyone a Glock is better than a S&W. Just that it's better for me. Both are fantastic and worth the money.
One way I made my mind up was going from one do all pistol to two pistols. One for carry and one for competition. The M&P 9mm fullsize seemed just a touch to big for carry. I am 6' 2" and 215-220 lbs. I couldn't fully conceal the butt of the pistol with just a t-shirt. wearing a plaid type button up like I do at church was no problem at all. I could get a smaller gun for carry but then using it in competition might be less than desirable. The glock 19 had a better size for carry compared to the S&W. I can carry the Glock now with a t-shirt, like right now as I type even, and not have any problems. On to getting a competition gun. I like the idea of magazine compatability with my firearms so looking at the Glock 34 just made sense, not to mention it has a longer barrel than the S&W. I had shot the Glock 17 and knew i liked the grip of the 17/34 and the longer barrel seemed like a selling point to me.
In recap, the M&P was a bit to big for me to carry as comfortably as I wanted and a little to small to be the gun I wanted for competition. The Glock 19 gen 4 was the perfect size for me to carry and had all the ergonomics I needed. The Glock 34 gen 4 is essentially purpose built for production division shooting in USPSA, and I could use my 34 mags in my 19. One more time for the sake of redundancy everyone is different but this is what worked for me. I hope this spiel about how I made up my mind between the two can be helpful to someone in the market.
Edit to add: I run the medium backstrap on both Glocks and have a ghost 3.5lb trigger connector in both. I really like this trigger. All I need to do is put some Dawson fiber optic sights on my 34.