The 17-40 f/4 is a perceptual match for the 16-35 f/2.8II from f/5.6-f/11. If your shooting style means you don't need f/2.8 in your wides, the f/4 17-40 delivers. Not only is it half the price, it's a lot lighter in the bag and takes 77mm filters which may match other Canon L glass that you might have. I shoot with the 17-40 f/4 for very technically demanding clients.
But if f/2.8 performance is genuinely important to you and you have the budget, the 16-35 f/2.8II is as good a wide Canon zoom as you're going to find. If you're considering pre-owned, steer away from the MkI version of this lens.