[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: One more item to the collection of Lua hate-speech
- From: Alexander Gladysh <agladysh@...>
- Date: Fri, 2 Jul 2010 02:48:08 +0400
> I agree, defaulting to global scope is one thing that always irks me
> in Lua. It's easy to define a local variable in some module function,
> then later delete the definition but neglect to delete an assignment -
> now it's a global variable that suddenly appears, causing potential
> confusion. Not to mention inexperienced/lazy programmers making
> everything global because they don't realize/forget/don't care that
> they need to specify otherwise, thus polluting the global namespace.
> I'm sure it has some advantages, but they're escaping me at the moment.
Perhaps this wiki page would be useful:
http://lua-users.org/wiki/LocalByDefault
Alexander.