[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua 5.2 environments and changing a loaded file environment
- From: Roberto Ierusalimschy <roberto@...>
- Date: Fri, 13 Aug 2010 14:05:35 -0300
> > Basically you want to break a function abstraction, interfering from the
> > outside in what the function does inside. This is a hack, no matter how
> > you implement it. This kind of thing should not be a regular operation
> > in the language (as it was with setfenv).
>
> Are you saying that this is not something you should do, or that if
> you decide to do something this extreme (which fundamentally changes
> the behaviour of specific scripts you load) you shouldn't be afraid of
> using debug.upvaluejoin in the implementation?
The second option.
-- Roberto