lua-users home
lua-l archive

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


On Thu, Jan 7, 2010 at 19:01, Roberto Ierusalimschy
<roberto@inf.puc-rio.br> wrote:
> Lua 5.2 will have "lexical environments", a kind of lexical setfenv.
> The construction "in t do command end"  will execute <command> with
> all global variables being resolved in <t>.

Actually, I'd love to hear the official "motivation" behind this feature.
New syntax constructs are rarely introduced in Lua, and this one was
dropped like a bomb, without any warning.
I, of course, do not question the ultimate right and competence of Lua
authors to introduce language features as they see fit. However, I
feel that I do not completely understand why this feature is here and
how should we use it.

I feel that a certain amount of background information for this set of
language changes (get/setfenv, loadin, in..do..end) would really help
understanding them in a proper way.

Given my reading sloppiness, such text was already posted and I've
missed it. If so, then I humbly ask to point me to the correct post.

Alexander.