lua-users home
lua-l archive

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

在 2016/8/5 6:47, Soni L. 写道:

Also that wouldn't really solve the problem with upvalues with same name as locals...

It has to be built into the parser/compiler/VM. But thanks anyway. :)

I think the rule of lexical scope is just fine, it just works this way:

names in inner scope would shadow same names in outer scopes.

you don't want it, you don't use same name in nested scopes.

I don't see any need for mechanism to mess up the lexical scope rule.

the nerdy Peng / 书呆彭 / Sent from Thunderbird