lua-users home
lua-l archive

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


Roberto Ierusalimschy wrote:
Surely it is.

In these discussions in the list, sometimes it looks like people are
changing environments all the time, in all sorts of code. I may be
very wrong, but my impression is that changing the environment is
seldom done, mainly (only?) in the setup of a module or when running
untrusted code. I would like it to look "ugly", to be easily seen
and found (e.g., "/_ENV"), not to look like "code as usual".

For me, it's definitely "code as usual", though I can certainly live with

  do local _ENV = e;  f() end

In my adventure-book "Medusa" compiler, I execute user-written functions multiple times in slightly different environments that are passed around.

  Enrico