lua-users home
lua-l archive

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




On 4 Jul 2018, at 21:06, Jakub Jirutka <jakub@jirutka.cz> wrote:

Hi,

I completely agree with the proposal and all the points why it's needed.
- very well written!

"global by default", specifically defining variable as global by default
(and also no difference between declaring global variable and
reassignment of any variable), is one of the few ugly sides of Lua.
Solving this problem would make Lua much better language.


Usually stuff is the way it is for a reason. And complex problems don’t have simple solutions.

As I learned, reading back some previous answers by Roberto [1] on this matter, "global by default” is actually the more common pattern.

Thijs


[1] http://lua-users.org/cgi-bin/namazu.cgi?query=global+by+default+%2Bfrom%3Aroberto%40&idxname=lua-l&max=20&result=normal&sort=score
   If you’re really interested in the subject and the why, I highly recommend reading some of those messages.