For me, I'm a Glock guy so I'm biased towards liking them better.
But objectively, I never liked the hinged trigger on the S&W's but that can be remedied with aftermarket trigger shoes so that is a non-issue unless one wants to keep things stock.
Really, it comes down to which one feels better, points naturally for you, and you ultimately shoot best. Glock makes great firearms, S&W makes great firearms, both customer services are great, and aftermarket for both are really good with the edge towards Glock. I appreciate that I can order any part for my Glocks from multiple vendors and have extra parts to keep a gun running in perpetuity.
Between those two there isn't a bad choice; just the right choice for you.