I voted for the S&W M&P. It has all the functionality of the Glock, but with more comfortable ergonomic grips and a better trigger. Just go to any gun store and ask to handle both and you'll see just what I mean. A more comfortable grip = less hand fatigue = more range time. Smoother more comfortable trigger = better shot placement.
While Glock has earned a reputation as the workhorse of semi-auto handguns, it also is a 30 year old design. While most people will say "It's reliability that matters, so long as the gun can shoot". Just think of what type of car you were driving in 1982, and compare that to a car from 2005. While the engines are probably very similar in functionality and reliability, the creature comforts and accomodations have significantly evolved with the times for the newer model. Such is the S&W M&P, compared to the Glock. Both are excellent guns, but given the choice between the two-- the M&P all the way.