You shouldn't hang your career on any one language.
But languages themselves are almost trivial.
Knowledge of libraries, and community expectations around them, doesn't translate well between languages.
And personal libraries, laden with solutions for the domains you've tended to specialise in, don't translate at all. You basically have to start from scratch, which is a huge loss if they are genuinely useful and took years to develop and accumulate.
You can't just rewrite those quickly, and you're unlikely to find a third party library in any language that solves the same problems.
I can see how this may be meaningless to someone whose career consists of moving from company to company, never carrying anything forward other than what's in their head. But some people carry forward substantial personal libraries which they use.
The loss of those can easily be a 10x loss in productivity, so switching to a new language and its entire ecosystem can be a big and expensive step, compared with not doing so.
Yes, over a career you can become expert in several. I would even say quite a lot. And yes, you can always learn new things.
But there will be times when you lose a lot of your advantages due to starting from scratch with something new. That's a big cost, it shouldn't be ignored.
When it's necessary, such as learning an ML framework, say, it's a justified cost, and everyone pays it.
But when it's just due to changing fashions it's a bit galling, and difficult to justify when is the right time. So much is lost.
You shouldn't hang your career on any one language. But languages themselves are almost trivial.
Knowledge of libraries, and community expectations around them, doesn't translate well between languages.
And personal libraries, laden with solutions for the domains you've tended to specialise in, don't translate at all. You basically have to start from scratch, which is a huge loss if they are genuinely useful and took years to develop and accumulate.
You can't just rewrite those quickly, and you're unlikely to find a third party library in any language that solves the same problems.
I can see how this may be meaningless to someone whose career consists of moving from company to company, never carrying anything forward other than what's in their head. But some people carry forward substantial personal libraries which they use.
The loss of those can easily be a 10x loss in productivity, so switching to a new language and its entire ecosystem can be a big and expensive step, compared with not doing so.
Yes, over a career you can become expert in several. I would even say quite a lot. And yes, you can always learn new things.
But there will be times when you lose a lot of your advantages due to starting from scratch with something new. That's a big cost, it shouldn't be ignored.
When it's necessary, such as learning an ML framework, say, it's a justified cost, and everyone pays it.
But when it's just due to changing fashions it's a bit galling, and difficult to justify when is the right time. So much is lost.