I'm 35 and I'm not worried AT ALL that I will be discriminated after I am 40.
I think in a way we're the golden tech generation, we screwed our elders by discriminating against them when the industry was in disruption and now we're screwing the younger generation like in any other mature industry.
I'm saying "we" as in "my generation", I don't feel I personally took a big part in any of it.