How do you switch mentally between programming languages

Renegade

Staff member
Luminary
Do any of you work with multiple programming languages at once? How do you switch mentally between them. Or even if you work on say one tech stack on one project and then on another tech stack in the next project, how do you get back in the mould.

For example a ? is a null operator in Flutter but a predicate method convention in Ruby.
 
I am pretty amateur in programming so when I am switching language it is a hassle as I have to start thinking more about the syntax and idiosyncrasies of the language rather that the original program I was trying to solve. Sometimes I get distracted by the language and go off in a different tangent altogether.

Parser helps in simple analysis of code. But recently I properly configured LSP (language server protocol) and that has been a big help when writing code and switching languages.