In Vimscript, the script scope s:
can be used to avoid name clashes between plugins. I'm writing a Vim plugin in Lua, and I noticed Vim runs all of its Lua code in a common scope. This means my plugin's Lua functions are visible to any other plugin using Lua, and seems like a name clash waiting to happen.
Although my example involves Lua, this question also applies when developing Vim plugins in Python or Ruby. I could just prefix all of my Lua functions with the plugin name, but is there more a reliable/standard way to encapsulate Vim plugin code when using these languages?