I'd get the Gen4. Besides the extra magazine, it has the new ejector which will fix the ejection problem if the gun has it.
A small percentage of recent production Gen3 and Gen4 9/40/357 have erratic ejection that can be bad enough to result in failures to eject. With some, the cause is as simple as an out-of-spec extractor because replacing it fixes the issue. More often than not however, even using an extractor from another gun known to work properly has no affect, only the new ejector will fix it.
I have a Gen3 G27 with NRR serial # prefix and it ejected erratically, though it never malfunctioned. I didn't notice it until about 200 rounds in, so I don't know if it was doing it before that, but it did get progressively worse with higher round count. About 10% of the spent casings would eject straight over my head, some barely touching the top of my head, and a few would eject straight up in the air, hit the ceiling of the shooting stall and come right back down. To confirm this I had someone else watch me shoot. There was quite an extreme amount of brass shavings and dust collecting on the ejection port, with corresponding triangular shaped dents/scrapes at the case mouths of 99% of the spent casings. I tried the extractor from my G23 which ejects fine and it made no difference. I installed a 28926 ejector into the Gen3 trigger housing to use in this gun as well as using a new extractor, and it fixed the problem. Everything now ejects to the right between 3 o'clock and 5 o'clock, and there are no more dents/scrapes at the case mouths of the spent casings. On 50% of the casings there is a tiny scrape about midway down the length of the casing, so the casing is still barely scraping the bottom of the ejection port, but I consider the problem fixed. One of my relatives has a Gen3 G23 with the same problem. I have a Gen3 G23 that ejects fine, we've shot each others' guns with the same ammo and magazines and the ejection problem stays with his G23.
In the case of my G27, I believe the cause of the problem is that the cut-out in the slide which holds the extractor was not positioned correctly. I put the extractor from my G23 which ejects fine into the G27 slide and compared how each slide held the extractor, both with and without a spent casing with the primer punched out under the claw. In the G27 slide, there's more of a gap between the claw and the breech face with and without the casing, and the casing is held to the breech face with noticeably less tension. The extractor depressor plunger has some pretty extreme wear on the muzzle end which does not appear on the EDP of my G23.
If you get a Gen3 and it ends up having the ejection problem, it's a simple matter to install the new ejector. You have to order a Gen4 trigger housing that has the new ejector, remove the Gen3 trigger housing from your gun, pull the ejectors out of each and put the new ejector into the Gen3 housing to use in your Gen3 gun. I don't understand why Glock isn't using the new ejectors in Gen3's as well.
So far only one retailer has been confirmed to sell the Gen4 .40 trigger housing with 28926 ejector, glockparts.com. I bought a couple and the ejectors don't have numbers on them, but they are indeed the 28926 ejector. MidwayUSA.com and glockparts.com have both been confirmed to sell the Gen4 9mm trigger housing with 30274 ejector. Other retailers presumably still have the old Gen4 trigger housings with the old ejectors.
Here are a couple of videos showing the ejection problem:
1.
http://www.youtube.com/watch?v=IGVk5yYu3Kg
2.
http://www.youtube.com/watch?v=wkHEdNx0Mk4