[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua registry, environment, and threads.
- From: Roberto Ierusalimschy <roberto@...>
- Date: Thu, 7 Jan 2010 14:01:20 -0200
> Also, getfenv(0) and sefenv(0, ...) can access the current thread's
> environment (which means that there is the potential for plain Lua
> code to be affected).
Actually, getfenv and setfenv will be deprecated too. (But is is easy
to have them back for compatibility.)
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>.
Modules can be written as "in module(...) do <body> end", with the
module function returning the module table.
lua_getfenv and lua_setfenv will continue, as debug.setfenv and
debug.getfenv.
-- Roberto
- Follow-Ups:
- Re: Lua registry, environment, and threads., steve donovan
- Re: Lua registry, environment, and threads., Mark Hamburg
- Re: Lua registry, environment, and threads., Leo Razoumov
- Lexical environments in 5.2, Doug Rogers
- Re: Lua registry, environment, and threads., Enrico Colombini
- Re: Lua registry, environment, and threads., Mike Pall
- Re: Lua registry, environment, and threads., Wim Couwenberg
- Re: Lua registry, environment, and threads., Jerome Vuarand
- Re: Lua registry, environment, and threads., Alexander Gladysh
- References:
- Lua registry, environment, and threads., Christian Tellefsen
- Re: Lua registry, environment, and threads., Patrick Donnelly
- Re: Lua registry, environment, and threads., Roberto Ierusalimschy
- Re: Lua registry, environment, and threads., Christian Tellefsen
- Re: Lua registry, environment, and threads., Roberto Ierusalimschy
- Re: Lua registry, environment, and threads., Mark Hamburg
- Re: Lua registry, environment, and threads., Patrick Donnelly