Though it isn't really a big deal, the .40 round makes a light pistol like the Glock pretty snappy, and I always enjoyed shooting my G17 or 19 rather than my buddy's G23 because of that. But the advice to get the G23 and get the 9mm. conversion barrel makes a useful point, especially if you're torn between the two rounds.
And while the .40 may be a balistically superior round, recent advances in bullet technology have yielded some very lethal, high-quality 9mm ammo, so I think that consideration is minimal.
Though 9mm is cheaper, I keep hearing that during all the recent panics, .40 was still commonly found, while 9mm turned into unobtanium, so that may be something to consider. But whatever you get, you should immediately put away at least a few boxes (if not a case) that you have no intention of touching any time soon.
Another thing, I seem to see in the used market a lot of guys ditching the .40, in favor on 9mm and .45. If that's accurate,and not just an inpression I'm getting, then that would make 9mm G19 more desirable in a future trade or sale, and I've often profited by the rule of thumb, "all other things being (more or less) equal, go with best re-sale value".
I personally prefer the G19 and the 9mm, and I think it may give you more flexibility down the road should you want to move it and get into something else.