[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua registry, environment, and threads.
- From: Cosmin Apreutesei <cosmin.apreutesei@...>
- Date: Sun, 10 Jan 2010 15:56:44 +0200
>> Regardless of motivation, there's a technical limitation of current
>> function environments that lexical environments are solving, and it
>> can only be solved by introducing new syntax (it's gotta be a lexical
>> thing). Currently you can't have the same function in two environments
>> at the same time.
>
> Well you can. I guess you mean a function can't have 2 environments at
> the same time. My understanding is that it still can't.
Right, sorry I spoke too early. So what this actually does is sparing
you a closure and the associated ugly syntax. Then maybe pcall()
should deserve the same improvement for less garbage-making error
handling?
Problem is, I don't see how orbit.htmlize() can still be implemented in 5.2 :(
How about a built-in function ecall(env,f,...) ? And of course,
ecall() would NOT be implemented via setfenv(), so you could still
call f() properly from another thread while inside ecall().
- References:
- Lua registry, environment, and threads., Christian Tellefsen
- 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., Alexander Gladysh
- Re: Lua registry, environment, and threads., Cosmin Apreutesei
- Re: Lua registry, environment, and threads., Matthew Wild