[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Lua scope global by default, why?
- From: Anticept <anticept@...>
- Date: Tue, 29 Apr 2008 06:32:57 -0400
Good Day everyone,
I would like to ask why Lua scope is global default? I have tried
combing the message boards for a reason as to why this is set to work
this way, but to no avail. I do not mean any insult to anyone, but isn't
this a bad practice, especially for an embeddable language? With many
games using this language to allow customization and modification to the
game itself, I find this becomes prone to errors, particularly for new
For example, the game "Garry's Mod" uses Lua to create the tools and
functions of the game to interact with the environment. However, often
many new and experienced programmers alike sometimes overlook scope
during the course of their programming, and this creates subtle
conflicts that sometimes break down the game experience. Also, very
often, as many modifications are installed to the game, these subtle
conflicts can cause catastrophe, and make bug squashing very very
difficult, as by themselves, these modifications work flawlessly.
Is there a possibility of Lua moving away from this? Or perhaps,
allowing the embedding programmer to change the default scope?
I thank you for your time! :-)