by compact do you mean "compact" as in the G19 size.... or compact as in "smallest size offered for concealment"? as in the G26?
While I like .40 SW, and prefer the G23 for their "compact" size and G27 for their "subcompact" size (smallest they offer), for a new shooter, 9mm has less recoil so I'd say
go with the G19. It's not their sub-compact, but small guns like the G26 are a little harder to handle for a new shooter. Not that much harder, but you're hands won't sting after practicing with the G19 making it a good choice.
Also, 9mm is a good choice as it's the easiest to find ammo for out of the Glock line.
What are you intending it for? Self-defense, or target-shooting? 9mm is fine for either btw.
---
and as for the guys advocating the G29..... sheesh.... great gun no doubt, but for a new shooter? I think not.
Might as well recommend .500 mag for a first wheelgun.