lua-users home
lua-l archive

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

> I have a new patch that allows table constructs to enclose a scope
> so that variables used inside the table have special meaning.

Interesting but strange: it uses a run-time feature (the __scope metamethod)
to implement name resolution that only occurs once, at table creation.

Also, strictly speaking, you could argue that the __newindex metamethod
could work just as well in that case. There'd be no need for a separate
metamethod; just extend its semantics to table creation.