yes, of course, and explicitly targeting workers under 45 over workers over 45 does violate labor law in many jurisdictions.
However, to the best of my knowledge, there's nothing illegal about offering people $35,000 a year for full time work. I mean, you are delusional if you think you are getting any but the programmers nobody else wants at that rate, and right now, there's not a lot of those, but there's nothing illegal about hiring people who don't have a lot of other options, and from experience, when you underpay, people will use you as a stepping stone to get to a job that pays well, but none of that is illegal, or I think even unethical. One could argue that you are giving people who otherwise wouldn't have a chance a chance, and once they have a programming job, even if it's a job that pays shit, it's way easier to get a programming job that pays okay.
(at $35,000 you are going to have a hard time arguing that they are exempt, of course, which could be a problem... but you could legally pay them a lower hourly wage and time and a half overtime, if you wanted; that's just an accounting/planning "compliance issue." And there's a lot to be said for just working eight hours, which is more common in my experience than it is in conversation.)
To me, this whole conversation is weird... my experience interviewing at startups is that yes, they expect me to be younger and cooler than I am... but they also pay way less and expect more work than big companies do. I kinda think that the "young and cool" thing might just be a cover for the "not willing to pay very much" thing. It's more socially acceptable to be openly discriminatory than it is to just openly say "Hey, I'm cheap"