lua-users home
lua-l archive

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

I am wondering why LUA is be designed like this:

    j = 10     -- global variable
    local i = 1 -- local variable

and not like python:

    global j = 10 -- global variable
    i = 1          -- local variable

I usually forget to add local to variable declaring,
Because nearly all programing language which I used default set variable's scope to local.

Is there someone can tell me why?