I would certainly agree that your best shot at maintaining your passion would be to stick with 1 or 2 languages and get really good at them. Constantly context switching does wear on a person.
With that said, there are some caveats...
1) Businesses need to find that language useful and important. In other words, there must be opportunities to make money using that language.
2) The language must support great depth of work. For instance, learning Objective-C or Swift could become dry over the years as you master the iOS SDK. There's a lot there to cover, for sure, but I imagine after 10 years you might arrive at the same endpoint: Somewhat deflated, certainly less passionate.
3) The language must resonate with you. Everybody has a language or a programming style they enjoy. Personally, I love classic, imperative, low level stuff. C, C++, even Java. Not really a big fan - despite years of professional work - of declarative UI, or functional programming.
I'm curious since you have 20 years - what language / domain have you been focussed on? How did it work for you?
I got into php in the very beginning. Kept learning everything else but found the limitations a fun challenge and being able to rapidly produce something kind of works with my matra of wanting to do a bit of everything.
I started with C/C++ so php was natural fit.
A good question would be if starting out today what language would I pick?
I'm tempted to pick php but I would probably go for react. The market is huge career-wise, the language is fun to develop in and the community is strong.
I would certainly agree that your best shot at maintaining your passion would be to stick with 1 or 2 languages and get really good at them. Constantly context switching does wear on a person.
With that said, there are some caveats...
1) Businesses need to find that language useful and important. In other words, there must be opportunities to make money using that language.
2) The language must support great depth of work. For instance, learning Objective-C or Swift could become dry over the years as you master the iOS SDK. There's a lot there to cover, for sure, but I imagine after 10 years you might arrive at the same endpoint: Somewhat deflated, certainly less passionate.
3) The language must resonate with you. Everybody has a language or a programming style they enjoy. Personally, I love classic, imperative, low level stuff. C, C++, even Java. Not really a big fan - despite years of professional work - of declarative UI, or functional programming.
I'm curious since you have 20 years - what language / domain have you been focussed on? How did it work for you?