lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On 9 July 2010 10:03, Vadim Peretokin <vperetokin@gmail.com> wrote:
> I'm not sure why. In my case, they're great for newbie scripters (who just
> want to use the language to accomplish some simple goal with help of
> scripting) - their variables work across a variety of inputs/outputs they
> can interact with since they're global to the state.
>

Personally I liked being able to use globals before I learned how
lexical scoping worked. They are definitely easier to use for
beginners, which I think is part of why Lua is easy to learn. I would
advise beginners to give their variables unique names of course.

Though if I "pollute the namespace" with a global called "a" or
"count", it’s only 50% my fault :-)

Vaughan