Well, yes and no. Most of programming isn't really coding, it is easy to learn new keywords and syntax. Some of it is formal problem solving, which is abstract. But a lot of it is domain-specific knowledge. This isn't true if you just make websites and there's no-one with much experience because the technology changes every few years. If you don't use it, you lose it.
And the dark side is, ageism is rife in our industry. You could be an expert in language X with 20 years experience and every programmer knows that you could learn language Y easily enough. But you have to convince a hiring manager on the "graduate fast track" who wants someone who knows Y and thinks that anyone who hasn't made manager by 30 is a failure.
You can screw around and play the "rockstar" in your 20s, but it gets harder and harder as you get older, and the number of people able to live this lifestyle in their 40s is orders of magnitude smaller.
"This isn't true if you just make websites and there's no-one with much experience because the technology changes every few years."
Websites are in their own world though. An * expert web programmer has certain advantages. At any moment you can delve into blackhat stuff and make money. I'm not sure what you mean by website technology as always changing so maybe I'm about to say something dumb but here it goes - The syntax changes a lot, sure, but the basic ideas of automation and data work of mining, collecting, and organizing have always been around. Now they are just at the forefront.
* all this really means is you're a good programmer that understands how the web works and knows things like traffic generation, and how money is made on the web. But basically 90% of the real expertise and time is still with actual programming.
I mean you could have been an experienced user of say Cold Fusion, then spend 6 months living on a beach in Thailand and when you come back the industry is shifted to PHP.
As an analogy, think of the Swiss watch industry. There were people there with 30 years experience with the most intricate mechanical devices in the world. Didn't help them one little bit when the Japanese invented the quartz movement, the skills just weren't transferable.