lua-users home
lua-l archive

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


On 2 June 2011 08:19, Geoff Leyland <geoff_leyland@fastmail.fm> wrote:
> On 2/06/2011, at 7:13 PM, Xingzhi Pan wrote:
>
>> Oh mine, it is a bit unintuitive to leave "global" as default.
>
>
> Local by default is worse: http://lua-users.org/wiki/LocalByDefault

I've flip-flopped on this question, but have ended up in the "local by
default" camp. It simply causes fewer problems (not "no problems")
than the reverse, and simply laying some Lua side-by-side with
equivalent Python shows this: the Lua contains many "local"s, whereas
the Python contains almost no "outer"s.

-- 
http://rrt.sc3d.org