Above 40 good programmers probably are rare, but doesn't have much to do with age, but is more of a generation difference. 40 and below is the same as the gamer generation, starting with those growing up with the first popular home computers (vic20/c64/zx spectrum).
Someone able to write C64 assembler games/demoes 25 years ago, will still be a great programmer today, even if he didn't touch a computer since then. The basics haven't changed that much, nothing that cannot be learned within a few weeks.
Older programmers are probably less likely to jump every new hype. For them it's just the nth way to do same, only without the already collected/own written libraries and tools. That could be a disadvantage when looking for a new job.