The article below is click baity but there is some validity to the basic idea of it: Why invest so much time and energy into learning something technical if it could just become antiquated or extinct?
I think the solution is to be more focused on studying the things that are are evergreen about technology. High-level code architectural and organizational concepts remain largely the same regardless of the language and systems thinking is important outside of code.
What happens to the person who spent night and day studying Objective-C only to be horrified by the Swift announcement at WWDC 2014? Do they keep coding in what is quickly becoming the language of lesser choice, or do they start again? If you’re a young twenty-something, this may pose little difficulty, but if you’re taking care of a family — with bills to pay and mouths to feed — the task becomes Herculean.