When you work across multiple programming languages, there is a problem you encounter...

A valid name (identifier) in one language is invalid in another. For example...

var new function this are a keywords in JavaScript, but you can use them freely in Python. Similarly list dict def can be used in JavaScript without problems.

This is a very common and something programmers generally quickly become acquainted with when they program in multiple languages.

However, when you're working in collaboration, you have to lay out some rules/guidelines for your team members to ensure consistency and uniformity in the code. With teams, this issue becomes more important than simply remembering what's valid and what's not while you program.

So, my question is, what strategies you adopt...


simply take a union of all the reserved words present in all the languages you use, hand out a list to everybody and abstain their use?
accept the diversity and take extra pains when "context switching"
adopt an intermediate ground where one language can use the other's, but not vice-versa


(Note: i am only talking about Python and JavaScript in this question ... but please answer the question more broadly)

-- UPDATE --

Thanks for all the answers. So the general consensus i see emerging is to let programmers use any name regardless of what they do other languages -- as long as names are descriptive, it doesn't hurt. 

Having programmed in quite a few languages over the 30+ years of my experience, I would say that trying to find naming standards that will work in any language is probably a pie in the sky idea.

Early on in my experience, I tried to use #define macros in C to create things that would make my C code look like the Pascal code that I was using before that. I was so used to programming in Pascal that I figured if I could just make C work like Pascal it would make me more productive. I soon discovered that I was wrong.

What made me more productive was to learn C and to not try to leverage Pascal syntax into another language just because it made me more comfortable.

I think you will be potentially constraining your programmers by prevent them from doing something in one language, just because it is wrong to do it in another language you are using.

If you limit your naming conventions to things that make sense to explain the variable use, then you will probably create good code, in whatever language.
