The Glock website does a better job than I could of explaining the improvements they made for Gen4. One feature is a new, dual recoil spring that I've heard was designed specifically for .40 caliber. I would choose Gen4.
In fact, I just bought a G17 Gen4 earlier this evening. My first Glock. I haven't shot mine yet, but I rented a G17 Gen4 a few days ago and I loved it.