lua-users home
lua-l archive

Re: setfenv/getfenv

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


David Given <dg@cowlark.com> writes:
> I've also just spotted another huge advantage of in: it's reentrant.
Right.
Something like "callin (FUN, ENV, ...)" would also be reentrant
(presuming a reasonable implementation), but still offer some of the
functionality of setfenv for cases where "in ENV" doesn't suffice.
[Another possibility would be "copyfun (FUN, ENV)", which could return a
copy of FUN with the environment replaced by ENV.]
-Miles
-- 
The key to happiness
 is having dreams. [from a fortune cookie]

AltStyle によって変換されたページ (->オリジナル) /