While it's certainly very real, it's conflated with a lot of things: compensation expectations, specialization, potentially not up on current trends, maybe set in ways, etc.
I think a big one is there just being fewer old programmers so you don't see them as much so you think there's ageism. But the market has grown a ton over the past 10-20 years.
None of my friends in their 40s have trouble getting jobs. This includes software jobs that tend to skew young, such as game dev and startups.
I wouldn't doubt it exists, but anecdotally it doesn't seem to be such a huge problem that you can't continue coding until a standard retirement age.
Maybe naive but I don't really see 40s as ageism territory in general. That said, a lot of people adapt. Go into management. More externally facing roles. Different types of companies.
In my 20s I was told 30 is the end of the line. In my 30s I was told its the 40s. Now the bar is higher.
Maybe I'm part of a large enough cohort of programmers that we continually push ageism out, and due to that it will be 'solved' as we hit our 60s and 70s.
The key is probably that you can't be doing at 40 what you're doing at 20. Whether that means better technical skills, better management skills, better communication skills, just better able to navigate a company and the industry...
It probably does mean that, if someone just wants to code, they probably have a higher bar than people interested in doing a more diverse set of things.
None of my friends in their 40s have trouble getting jobs. This includes software jobs that tend to skew young, such as game dev and startups.
I wouldn't doubt it exists, but anecdotally it doesn't seem to be such a huge problem that you can't continue coding until a standard retirement age.