Re: Lua registry, environment, and threads.
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: Lua registry, environment, and threads.
- From: Enrico Colombini <erix@...>
- Date: 2010年1月08日 10:02:50 +0100
Edgar Toernig wrote:
Hm... just my 2c: I was never comfortable with the whole fenv concept
(each function carries its own table of globals). IMHO it's too clever
and produces more confusion then it gives features. I saw not one use of
it that did not trigger my "dirty hack" radar.
It's great for sandboxes. I have an application where environments are
carried around and user functions are executed into them at different
times. It is very convenient to give the user the ability to just write:
a = 3
instead of something more confusing such as:
usertable.a = 3
Besides, with setfenv() user functions can't modify other variables.
Do you see a way of getting this (efficiently) without setfenv?
Enrico
- 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
- Re: Lua registry, environment, and threads., Roberto Ierusalimschy
- Re: Lua registry, environment, and threads., Enrico Colombini
- Re: Lua registry, environment, and threads., Roberto Ierusalimschy
- Re: Lua registry, environment, and threads., Edgar Toernig