lua-users home
lua-l archive

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


> >I am confused whether it is possible to associate the environment of
> >a Lua function with a C function. The manual seems to imply this is
> >not possible, but does not say so explicitly.
> [...]
> Is there any particular reason why this is not possible?

No strong reason. Mainly we felt that C functions do not need this
facility, because in C it is almost as easy to access any table field
as to access a global variable. Moreover, we did not want Lua to be able
to change the way a C function works (by changing its environment).

-- Roberto