> The first one is illegal
Partially illegal. I'm 39, and it is perfectly legal for companies to tell me they won't hire me because I'm too old. Next year it becomes illegal for them to do so.
They'll never actually admit it though even if it was legal though. Companies would prefer to say they're looking for a better fit or something equally vague.
When you say "Next year it becomes illegal for them to do so", what specifically are you referring to? I didn't catch the reference.
1) Is regular, ordinary age discrimination. This is why tech companies won't hire people starting second careers into entry level programming roles.
2) The widespread notion that more than about 5 years programming experience is not valuable, maybe even counterproductive. (Firm specific knowledge is a different story, tech companies do value that.) Hence all the "senior" programmers with 3 years experience.
--
The first one is illegal and in my opinion immoral. The second one to my mind an empirical question--it doesn't seem to be true based on my experiences and observations, but I'd be willing to have my mind changed by evidence.