I haven't read through all these replies but I'm going to give my opinion.
I love my 17-40L so far, I've only had it a short time. I wouldn't ever seriously compare a 30mm prime to a 17-40L. Two totally different lenses with different specialties. 95% of the time with my 17-40, I shoot at 17mm. I love wide angle shots.
I would almost always expect a zoom to not have the same IQ as a prime. From my experience, primes are almost always sharper.